diff --git a/source/src/pages/live.astro b/source/src/pages/live.astro index 0af3632..984df18 100755 --- a/source/src/pages/live.astro +++ b/source/src/pages/live.astro @@ -14,9 +14,14 @@ import { ArrowDown } from "@iconoir/vue"; // Fetch const CreatorName = Astro.url.href.split("live?=").pop(); -const Creator = await fetch( - "https://twitch-backend.sudovanilla.org" + "/api/users/" + CreatorName, -).then((response) => response.json()); +const Creator = await fetch("https://twitch-backend.sudovanilla.org" + "/api/users/" + CreatorName,).then((response) => response.json()); + +// Check if the Creator is live +if(Creator.isLive === true) { + var IsLive = true +} else if(Creator.isLive === false) { + var IsLive = false +} --- @@ -36,21 +41,31 @@ const Creator = await fetch(

{Creator.data.username}

- | -

{Creator.data.stream.title}

+ {IsLive ? + | +

{Creator.data.stream.title}

+ : + null + }

{Creator.data.followers} Followers

- + {IsLive ? + + : +
+

They're currently offline.

+
+ }