diff --git a/src/App.tsx b/src/App.tsx index 25b6182..ed2c7a3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -28,7 +28,14 @@ function App() { } /> } /> } /> - } /> + + Not realized page + + } + /> ); diff --git a/src/components/channel.tsx b/src/components/channel.tsx index 52ebd28..6f6bc7a 100644 --- a/src/components/channel.tsx +++ b/src/components/channel.tsx @@ -16,24 +16,29 @@ export function ChannelComponent({ navigate(channel.url || ""); }} shadow="none" + className="md:col-span-2 xl:col-span-3 2xl:col-span-4 gap-2 p-1 md:p-4" > - - -
-

{channel.name}

- {channel.verified && } -
- +
+ + +
+

{channel.name}

+ {channel.verified && } +
+ +

+ {channel.description || "No description"} +

+
- -

- {`${shortenNumber(channel.videos || -1)} videos`} -

-
+ {(channel.videos || -1) >= 0 && ( + +

+ {`${shortenNumber(channel.videos || -1)} videos`} +

+
+ )} ); } diff --git a/src/components/item.tsx b/src/components/item.tsx index 914d6db..f0ba042 100644 --- a/src/components/item.tsx +++ b/src/components/item.tsx @@ -14,7 +14,10 @@ export function ItemComponent({ item, channel }: ItemComponentProps) { ); } else if (item.type === "channel") { item = item as Channel; - return ; + return [ + , +
, + ]; } else {
Idk how to render this diff --git a/src/components/video.tsx b/src/components/video.tsx index 321a22c..5996aee 100644 --- a/src/components/video.tsx +++ b/src/components/video.tsx @@ -63,7 +63,7 @@ export function SkeletonVideoComponent() { } export function VideoContainer({ children }: VideoContainerProps) { return ( -
+
{children}
); diff --git a/src/pages/channel.tsx b/src/pages/channel.tsx index d143420..ad36f85 100644 --- a/src/pages/channel.tsx +++ b/src/pages/channel.tsx @@ -2,7 +2,7 @@ import { Channel, Tab } from "piped-api/dist/types"; import { SkeletonVideoComponent, VideoContainer } from "../components/video"; import { useParams, useSearchParams } from "react-router-dom"; import { Button, Card, CardFooter } from "@nextui-org/react"; -import { capitalize } from "../components/utils"; +import { capitalize, shortenNumber } from "../components/utils"; import React from "react"; import { CheckCircleIcon } from "@heroicons/react/24/solid"; import { ItemComponent } from "../components/item"; @@ -86,30 +86,34 @@ class ChannelPageŠ”omponent extends React.Component< ); } else { return ( -
+
-
+
- -
-
- {channel.name} + +
+
+
{channel.name}
+ {channel.verified && ( + + )} +
+ +
+ {shortenNumber(channel.subscriberCount)} subscribers
- {channel.verified && ( - - )}
-
+
@@ -122,7 +126,7 @@ class ChannelPageŠ”omponent extends React.Component< await this.updateTab(); }} key={tab.name} - className="text-xl font-bold mt-4" + className="text-xl font-bold" > {capitalize(tab.name)}