diff --git a/src/pages/watch.astro b/src/pages/watch.astro new file mode 100644 index 0000000..e8a8a0e --- /dev/null +++ b/src/pages/watch.astro @@ -0,0 +1,28 @@ +--- +// Layout +import Base from "@layouts/Default.astro"; + +// Environment Variables +const DEFAULT_INVIDIOUS_INSTANCE = import.meta.env.DEFAULT_INVIDIOUS_INSTANCE + +// Components + +// Fetch +const SWV = Astro.url.href.split("watch?v=").pop(); +const video = await fetch('https://' + DEFAULT_INVIDIOUS_INSTANCE + "/api/v1/videos/" + SWV).then((response) => response.json()); +const comments = await fetch('https://' + DEFAULT_INVIDIOUS_INSTANCE + "/api/v1/comments/" + SWV).then((response) => response.json()); +--- + + +
+