diff --git a/source/astro.mjs b/source/astro.mjs index 459fc1f..6343e5d 100755 --- a/source/astro.mjs +++ b/source/astro.mjs @@ -1,5 +1,4 @@ import { defineConfig } from 'astro/config' -import node from '@astrojs/node' import vue from '@astrojs/vue' import astroI18next from "astro-i18next" import mdx from '@astrojs/mdx' diff --git a/source/src/pages/discover.astro b/source/src/pages/discover.astro index 7d20315..ea814a4 100755 --- a/source/src/pages/discover.astro +++ b/source/src/pages/discover.astro @@ -74,7 +74,7 @@ else if (Astro.url.href.includes('?platform=twitch')) { Title={channel.title} Creator={channel.username} Avatar={channel.streamer.pfp} - Link={'/channel/twitch/' + channel.streamer.name} + Link={'/live?=' + channel.streamer.name} Thumbnail={channel.preview} View={channel.viewers} /> diff --git a/source/src/pages/live.astro b/source/src/pages/live.astro index 8603e3e..0fa3df4 100755 --- a/source/src/pages/live.astro +++ b/source/src/pages/live.astro @@ -1,34 +1,146 @@ --- // Layout import Base from "@layouts/Default.astro"; +import "@styles/video.scss"; // Environment Variables -const DEFAULT_STREAM_PROXY = import.meta.env.DEFAULT_STREAM_PROXY -const DEFAULT_STREAM_DATA_PROXY = import.meta.env.DEFAULT_STREAM_DATA_PROXY +// const DEFAULT_IMAGE_PROXY = import.meta.env.DEFAULT_IMAGE_PROXY +// const DEFAULT_STREAM_PROXY = import.meta.env.DEFAULT_STREAM_PROXY +// const DEFAULT_STREAM_DATA_PROXY = import.meta.env.DEFAULT_STREAM_DATA_PROXY // Components +import { Zorn } from "@minpluto/zorn"; +import { ArrowDown } from "@iconoir/vue"; // Fetch -const Channel = Astro.url.href.split("live?=").pop(); -const video = await fetch(DEFAULT_STREAM_PROXY + "/api/v1/videos/" + Channel).then((response) => response.json()); +const CreatorName = Astro.url.href.split("live?=").pop(); +const Creator = await fetch( + "https://twitch-backend.sudovanilla.org" + "/api/users/" + CreatorName, +).then((response) => response.json()); --- - + -
- -
- - - - - \ No newline at end of file +
+ +
+ +

{Creator.data.username}

+ | +

{Creator.data.stream.title}

+
+
+

{Creator.data.followers} Followers

+ +
+
+ + + + + +