Skip to content

Commit f8a309f

Browse files
committed
feat(ESG-3): Match route format for RoR site.
1 parent 0f81900 commit f8a309f

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

website/components/YouTubeListItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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>]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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>

0 commit comments

Comments
 (0)