forked from UKSOURCE/hailearning.edu.vn
fix: blog dynamic build
This commit is contained in:
@@ -53,9 +53,7 @@ export const fetchBlogList = async (
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// Next.js: cache và revalidate (disabled)
|
||||
// next: { revalidate: 60 }, // Revalidate mỗi 60 giây
|
||||
// no-cache
|
||||
// Không cache - luôn fetch dữ liệu mới nhất
|
||||
cache: 'no-store',
|
||||
});
|
||||
|
||||
@@ -91,8 +89,7 @@ export const fetchBlogDetail = async (
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// No cache for blog detail (disabled caching)
|
||||
// no-cache
|
||||
// Không cache - luôn fetch dữ liệu mới nhất
|
||||
cache: 'no-store',
|
||||
});
|
||||
|
||||
@@ -131,8 +128,7 @@ export const fetchFeaturedBlogs = async (
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// next: { revalidate: 60 },
|
||||
// no-cache
|
||||
// Không cache - luôn fetch dữ liệu mới nhất
|
||||
cache: 'no-store',
|
||||
});
|
||||
|
||||
@@ -168,8 +164,7 @@ export const fetchRecentBlogs = async (
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// next: { revalidate: 60 },
|
||||
// no-cache
|
||||
// Không cache - luôn fetch dữ liệu mới nhất
|
||||
cache: 'no-store',
|
||||
});
|
||||
|
||||
@@ -202,8 +197,7 @@ export const fetchCategories = async (): Promise<CategoryListResponse> => {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// next: { revalidate: 300 }, // Categories ít thay đổi, cache lâu hơn
|
||||
// no-cache
|
||||
// Không cache - luôn fetch dữ liệu mới nhất
|
||||
cache: 'no-store',
|
||||
});
|
||||
|
||||
@@ -239,8 +233,7 @@ export const fetchCategoryDetail = async (
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// next: { revalidate: 300 },
|
||||
// no-cache
|
||||
// Không cache - luôn fetch dữ liệu mới nhất
|
||||
cache: 'no-store',
|
||||
});
|
||||
|
||||
@@ -276,8 +269,7 @@ export const fetchTags = async (): Promise<TagListResponse> => {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// next: { revalidate: 300 },
|
||||
// no-cache
|
||||
// Không cache - luôn fetch dữ liệu mới nhất
|
||||
cache: 'no-store',
|
||||
});
|
||||
|
||||
@@ -313,8 +305,7 @@ export const fetchPopularTags = async (
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// next: { revalidate: 300 },
|
||||
// no-cache
|
||||
// Không cache - luôn fetch dữ liệu mới nhất
|
||||
cache: 'no-store',
|
||||
});
|
||||
|
||||
@@ -350,8 +341,7 @@ export const fetchTagDetail = async (
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
// next: { revalidate: 300 },
|
||||
// no-cache
|
||||
// Không cache - luôn fetch dữ liệu mới nhất
|
||||
cache: 'no-store',
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user