|
const videos = ref([]); |
|
|
|
async function getVideos() { |
|
const { data } = await useSupabase() |
|
.from("episodes") |
|
.select() |
|
.order("published_at", { ascending: false }) |
|
.limit(10); |
|
|
|
videos.value = data; |
|
} |
|
|
|
onMounted(() => { |
|
getVideos(); |
|
}); |
This could probably be
const { data: videos } = await useAsyncData(`videos`, () => useSupabase()
.from("episodes")
.select()
.order("published_at", { ascending: false })
.limit(10)
)
So that the data is pre-rendered
esg-remake/website/pages/index.vue
Lines 5 to 19 in f8a309f
This could probably be
So that the data is pre-rendered