fixed no images problem and no cache in fetchCourses
This commit is contained in:
@@ -92,7 +92,7 @@ export async function fetchCourses() {
|
||||
console.log('Fetching from URL:', url);
|
||||
|
||||
try {
|
||||
const response = await fetch(url, { headers });
|
||||
const response = await fetch(url, { headers, cache: 'no-store', next: { revalidate: 0 } });
|
||||
|
||||
|
||||
const result = await response.json();
|
||||
@@ -124,7 +124,10 @@ export async function fetchCourse(id: string) {
|
||||
|
||||
|
||||
try {
|
||||
const response = await fetch(url, { headers });
|
||||
const response = await fetch(url, {
|
||||
headers, cache: 'no-store',
|
||||
next: { revalidate: 0 }
|
||||
});
|
||||
|
||||
|
||||
var result: CoursesProps = await response.json();
|
||||
|
Reference in New Issue
Block a user