forked from UKSOURCE/hailearning.edu.vn
fix: blog dynamic build
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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[] = [];
|
||||
|
||||
Reference in New Issue
Block a user