-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
esg-remake/website/pages/index.vue
Lines 5 to 19 in f8a309f
| 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels