fix: blog dynamic build

This commit is contained in:
Wini_Fy
2026-02-06 12:09:33 +07:00
parent 300928ecb1
commit a9ff0e8947
8 changed files with 30 additions and 21 deletions

View File

@@ -1,6 +1,9 @@
import { AboutHero, AboutIntro, AboutMission, AboutFeatures, AboutNews } from "../components/about";
import { aboutApi } from "../../api/aboutApi";
// Force dynamic rendering - không cache
export const dynamic = 'force-dynamic';
export default async function AboutPage() {
const data = await aboutApi.getAbout();

View File

@@ -6,6 +6,9 @@ import { fetchBlogList, fetchBlogDetail } from "@/api/blogsApi";
import Sidebar from "@/app/blog/components/Sidebar";
import { getCmsImageUrl } from "@/utils";
// Force dynamic rendering - không cache
export const dynamic = 'force-dynamic';
// Generate static params for all blog posts
export async function generateStaticParams() {
try {

View File

@@ -12,6 +12,9 @@ import localHomeData from './home.json';
import { getCmsImageUrl } from '@/utils/image';
import { fetchHomeData } from '@/api';
// Force dynamic rendering - không cache
export const dynamic = 'force-dynamic';
export default async function Home() {
// Fetch home data (blog aggregation is now handled by the backend)
const apiHomeData = await fetchHomeData();

View File

@@ -4,6 +4,9 @@ import Breadcrumb from "../components/Breadcrumb";
import ImageWithFallback from "../components/ImageWithFallback";
import "./services.css";
// Force dynamic rendering - không cache
export const dynamic = 'force-dynamic';
export default async function ServicesPage() {
const data = await fetchServicePageData();
const allCountries = await fetchCountries();

View File

@@ -3,6 +3,9 @@
import Breadcrumb from "../components/Breadcrumb";
import { fetchVisaData, type VisaCountry } from "@/api/visa";
// Force dynamic rendering - không cache
export const dynamic = 'force-dynamic';
export default async function VisaListPage() {
// Fetch all visa countries từ API
let visaCountries: any[] = [];