Olivier Massot 1 rok temu
rodzic
commit
d7e6e4659a
2 zmienionych plików z 2 dodań i 15 usunięć
  1. 0 13
      components/News/Details.client.vue
  2. 2 2
      nuxt.config.ts

+ 0 - 13
components/News/Details.client.vue

@@ -111,19 +111,6 @@ if (!newsId || isNaN(newsId)) {
 // @ts-expect-error Until we can fix the typing of fetch
 const { data: newsItem, pending } = (await fetch(News, newsId)) as Ref<News>
 
-function sleep(time: number) {
-  return new Promise(resolve => setTimeout(resolve, time))
-}
-
-onBeforeMount(async () => {
-  console.log(newsItem)
-  while (pending.value) {
-    console.log('sleep')
-    await sleep(100)
-  }
-  console.log(newsItem)
-})
-
 const getImageUrl = (attachment: string | null): string | null => {
   if (!attachment) {
     return null

+ 2 - 2
nuxt.config.ts

@@ -30,8 +30,8 @@ export default defineNuxtConfig({
     // all routes will be generated at build time and cached permanently
     '/**': { prerender: true },
     // these pages will be background revalidated (ISR) at most every 60 seconds
-    '/actualites': { isr: 60 },
-    '/actualites/**': { isr: 60 },
+    '/actualites': { ssr: false },
+    '/actualites/**': { ssr: false },
     '/nous-rejoindre': { isr: 60 },
     '/nous-rejoindre/**': { isr: 60 },
   },