Merge branch 'main' of https://git.gnxsoft.com/gnx/GNX-WEB
This commit is contained in:
@@ -12,7 +12,11 @@ import ServicesInitAnimations from "@/components/pages/services/ServicesInitAnim
|
||||
import { Service } from "@/lib/api/serviceService";
|
||||
import { generateServiceMetadata } from "@/lib/seo/metadata";
|
||||
import { ServiceSchema, BreadcrumbSchema } from "@/components/shared/seo/StructuredData";
|
||||
<<<<<<< HEAD
|
||||
import { API_CONFIG, getApiHeaders } from "@/lib/config/api";
|
||||
=======
|
||||
import { API_CONFIG } from "@/lib/config/api";
|
||||
>>>>>>> d7d7a2757a183aa1abd9dbabff804c45298df4e5
|
||||
|
||||
interface ServicePageProps {
|
||||
params: Promise<{
|
||||
@@ -24,6 +28,7 @@ interface ServicePageProps {
|
||||
// This pre-generates known pages, but new pages can still be generated on-demand
|
||||
export async function generateStaticParams() {
|
||||
try {
|
||||
<<<<<<< HEAD
|
||||
// Use internal API URL for server-side requests
|
||||
const apiUrl = process.env.INTERNAL_API_URL || process.env.NEXT_PUBLIC_API_URL || 'http://127.0.0.1:1086';
|
||||
const response = await fetch(
|
||||
@@ -31,6 +36,15 @@ export async function generateStaticParams() {
|
||||
{
|
||||
method: 'GET',
|
||||
headers: getApiHeaders(),
|
||||
=======
|
||||
const response = await fetch(
|
||||
`${API_CONFIG.BASE_URL}/api/services/`,
|
||||
{
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
>>>>>>> d7d7a2757a183aa1abd9dbabff804c45298df4e5
|
||||
next: { revalidate: 60 }, // Revalidate every minute for faster image updates
|
||||
}
|
||||
);
|
||||
@@ -57,6 +71,7 @@ export async function generateMetadata({ params }: ServicePageProps) {
|
||||
const { slug } = await params;
|
||||
|
||||
try {
|
||||
<<<<<<< HEAD
|
||||
// Use internal API URL for server-side requests
|
||||
const apiUrl = process.env.INTERNAL_API_URL || process.env.NEXT_PUBLIC_API_URL || 'http://127.0.0.1:1086';
|
||||
const response = await fetch(
|
||||
@@ -64,6 +79,15 @@ export async function generateMetadata({ params }: ServicePageProps) {
|
||||
{
|
||||
method: 'GET',
|
||||
headers: getApiHeaders(),
|
||||
=======
|
||||
const response = await fetch(
|
||||
`${API_CONFIG.BASE_URL}/api/services/${slug}/`,
|
||||
{
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
>>>>>>> d7d7a2757a183aa1abd9dbabff804c45298df4e5
|
||||
next: { revalidate: 60 }, // Revalidate every minute for faster image updates
|
||||
}
|
||||
);
|
||||
@@ -87,6 +111,7 @@ const ServicePage = async ({ params }: ServicePageProps) => {
|
||||
const { slug } = await params;
|
||||
|
||||
try {
|
||||
<<<<<<< HEAD
|
||||
// Use internal API URL for server-side requests
|
||||
const apiUrl = process.env.INTERNAL_API_URL || process.env.NEXT_PUBLIC_API_URL || 'http://127.0.0.1:1086';
|
||||
const response = await fetch(
|
||||
@@ -94,6 +119,15 @@ const ServicePage = async ({ params }: ServicePageProps) => {
|
||||
{
|
||||
method: 'GET',
|
||||
headers: getApiHeaders(),
|
||||
=======
|
||||
const response = await fetch(
|
||||
`${API_CONFIG.BASE_URL}/api/services/${slug}/`,
|
||||
{
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
>>>>>>> d7d7a2757a183aa1abd9dbabff804c45298df4e5
|
||||
next: { revalidate: 60 }, // Revalidate every minute for faster image updates
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user