diff --git a/bun.lockb b/bun.lockb index 3a105f3..380f21d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index e94aa5c..7974efe 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@astrojs/node": "^8.3.3", - "astro": "^4.14.2" + "astro": "^4.14.3" }, "devDependencies": { "sass-embedded": "^1.77.8" diff --git a/src/components/Category.astro b/src/components/Category.astro new file mode 100644 index 0000000..53930a6 --- /dev/null +++ b/src/components/Category.astro @@ -0,0 +1,81 @@ +--- +// Properties +const { + Name, + CategoryType +} = Astro.props + +// Components +import Video from '@components/Video.astro' + +// Fetching +const Videos = await fetch('https://yt.sudovanilla.org/api/v1/trending?type=' + CategoryType) +.then((response) => response.json()) +.catch((error) => {}) + +if (Videos === undefined) {var Failed = true} +else {var Failed = false} + +--- + +
+
+

{Name}

+ See More +
+
+ {Failed ? +

Failed to load.

+ : + Videos.map((data) => +
+
+ + \ No newline at end of file diff --git a/src/components/CategorySkeleton.astro b/src/components/CategorySkeleton.astro new file mode 100644 index 0000000..38a0e0b --- /dev/null +++ b/src/components/CategorySkeleton.astro @@ -0,0 +1,174 @@ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/src/components/ChannelCardSkeleton.astro b/src/components/ChannelCardSkeleton.astro index 742c27e..c685277 100644 --- a/src/components/ChannelCardSkeleton.astro +++ b/src/components/ChannelCardSkeleton.astro @@ -43,7 +43,7 @@ const Channel = await fetch("https://yt.sudovanilla.org/api/v1/channels/UCY1kMZp -