File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed
Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const videoUrl = (youtubeId) => {
1010 <div v-if =" video" >
1111 <p ><img :src =" video.image2" alt =" thumbnail" /></p >
1212 <p >
13- <NuxtLink :to =" { name: 'video -id', params: { id: video.id } }" >{{
13+ <NuxtLink :to =" { name: 'v -id', params: { id: video.id } }" >{{
1414 video.title
1515 }}</NuxtLink >
1616 [<a :href =" videoUrl(video.video_id)" target =" _blank" >Video</a >]
File renamed without changes.
Original file line number Diff line number Diff line change 1+ <script setup>
2+ import YouTubeVideo from " ~/components/YouTubeVideo.vue" ;
3+ import { useSupabase } from " ~/composable/supabase" ;
4+
5+ const video = ref ();
6+
7+ const { params } = useRoute ();
8+ const videoId = params .id ;
9+
10+ async function getVideo () {
11+ const { data } = await useSupabase ()
12+ .from (" episodes" )
13+ .select ()
14+ .eq (" id" , videoId)
15+ .limit (1 )
16+ .maybeSingle ();
17+
18+ video .value = data;
19+ }
20+
21+ onMounted (() => {
22+ getVideo ();
23+ });
24+ </script >
25+
26+ <template >
27+ <YouTubeVideo :video =" video" />
28+ </template >
You can’t perform that action at this time.
0 commit comments