From 7797677468ce6fc06c6f3a6ea674a2ea5d701b23 Mon Sep 17 00:00:00 2001 From: Guusvanmeerveld Date: Mon, 28 Mar 2022 20:42:52 +0200 Subject: [PATCH] Clean up and fixes --- src/components/Channel/Inline.tsx | 4 ++-- src/components/Video/Grid.tsx | 2 +- src/interfaces/api/channel.ts | 17 +++-------------- src/interfaces/api/instances.ts | 12 ++---------- src/interfaces/api/thumbnail.ts | 0 5 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 src/interfaces/api/thumbnail.ts diff --git a/src/components/Channel/Inline.tsx b/src/components/Channel/Inline.tsx index 4f5341c..b2a6933 100644 --- a/src/components/Channel/Inline.tsx +++ b/src/components/Channel/Inline.tsx @@ -10,9 +10,9 @@ import { useTheme } from "@mui/material/styles"; import { abbreviateNumber, formatNumber } from "@src/utils/"; -import { Channel as ChannelModel } from "@interfaces/api/search"; +import { ChannelResult } from "@interfaces/api/search"; -const Channel: FC<{ channel: ChannelModel }> = ({ channel }) => { +const Channel: FC<{ channel: ChannelResult }> = ({ channel }) => { const theme = useTheme(); const thumbnail = channel.authorThumbnails.find( diff --git a/src/components/Video/Grid.tsx b/src/components/Video/Grid.tsx index b547f66..53a3767 100644 --- a/src/components/Video/Grid.tsx +++ b/src/components/Video/Grid.tsx @@ -2,7 +2,7 @@ import { FC } from "react"; import Grid from "@mui/material/Grid"; -import { Video as VideoModel } from "@interfaces/video"; +import VideoModel from "@interfaces/video"; import Video from "@components/Video"; diff --git a/src/interfaces/api/channel.ts b/src/interfaces/api/channel.ts index 7499e07..b0c9c78 100644 --- a/src/interfaces/api/channel.ts +++ b/src/interfaces/api/channel.ts @@ -1,4 +1,5 @@ -import Video from "@interfaces/api/trending"; +import { Quality } from "@interfaces/api"; +import VideoTrending from "@interfaces/api/trending"; interface Channel { author: string; @@ -14,7 +15,7 @@ interface Channel { description: string; descriptionHtml: string; allowedRegions: string[]; - latestVideos: Video[]; + latestVideos: VideoTrending[]; relatedChannels: RelatedChannel[]; } @@ -25,18 +26,6 @@ interface AuthorBanner { quality?: Quality; } -enum Quality { - Default = "default", - End = "end", - High = "high", - Maxres = "maxres", - Maxresdefault = "maxresdefault", - Medium = "medium", - Middle = "middle", - Sddefault = "sddefault", - Start = "start" -} - interface RelatedChannel { author: string; authorId: string; diff --git a/src/interfaces/api/instances.ts b/src/interfaces/api/instances.ts index 7dc4b83..e9aaab0 100644 --- a/src/interfaces/api/instances.ts +++ b/src/interfaces/api/instances.ts @@ -50,17 +50,9 @@ interface Metadata { } interface Software { - name: Name; + name: string; version: string; - branch: Branch; -} - -export enum Branch { - Master = "master" -} - -export enum Name { - Invidious = "invidious" + branch: string; } interface Usage { diff --git a/src/interfaces/api/thumbnail.ts b/src/interfaces/api/thumbnail.ts deleted file mode 100644 index e69de29..0000000