From 6f6675587156ffa388679facbd334e21ae5e99dc Mon Sep 17 00:00:00 2001 From: Chris Grimmett Date: Thu, 14 Mar 2024 14:08:49 -0800 Subject: [PATCH] 2024-03-14 update --- packages/link2cid/app.json | 14 + .../next/app/components/archive-progress.tsx | 10 +- packages/next/app/components/footer.tsx | 4 +- .../next/app/components/localized-date.tsx | 11 + packages/next/app/components/navbar.tsx | 2 +- packages/next/app/components/vod-nav.tsx | 4 +- packages/next/app/components/vod-page.tsx | 4 +- packages/next/app/vt/[slug]/page.tsx | 390 +++++++++--------- 8 files changed, 237 insertions(+), 202 deletions(-) create mode 100644 packages/link2cid/app.json diff --git a/packages/link2cid/app.json b/packages/link2cid/app.json new file mode 100644 index 0000000..2b90246 --- /dev/null +++ b/packages/link2cid/app.json @@ -0,0 +1,14 @@ +{ + "healthchecks": { + "web": [ + { + "type": "startup", + "name": "web check", + "description": "Checking for expecting string at /health", + "path": "/health", + "content": "link2cid", + "attempts": 3 + } + ] + } +} \ No newline at end of file diff --git a/packages/next/app/components/archive-progress.tsx b/packages/next/app/components/archive-progress.tsx index 2783f2f..3f292e1 100644 --- a/packages/next/app/components/archive-progress.tsx +++ b/packages/next/app/components/archive-progress.tsx @@ -1,4 +1,5 @@ import { getAllStreamsForVtuber } from "@/lib/streams"; +import { getVodsForVtuber } from "@/lib/vods"; import { IVtuber } from "@/lib/vtubers"; export interface IArchiveProgressProps { @@ -6,6 +7,7 @@ export interface IArchiveProgressProps { } export default async function ArchiveProgress ({ vtuber }: IArchiveProgressProps) { + const vods = await getVodsForVtuber(vtuber.id) // const streams = await getAllStreamsForVtuber(vtuber.id); // const goodStreams = await getAllStreamsForVtuber(vtuber.id, ['good']); // const issueStreams = await getAllStreamsForVtuber(vtuber.id, ['issue']); @@ -20,5 +22,11 @@ export default async function ArchiveProgress ({ vtuber }: IArchiveProgressProps // {completedPercentage}% // // ) - return "@todo" + // @todo + + return ( +
+

{(vods) ? vods.data.length : 0} vods

+
+ ) } \ No newline at end of file diff --git a/packages/next/app/components/footer.tsx b/packages/next/app/components/footer.tsx index e51f679..2727d0f 100644 --- a/packages/next/app/components/footer.tsx +++ b/packages/next/app/components/footer.tsx @@ -17,7 +17,7 @@ export default function Footer() { diff --git a/packages/next/app/components/localized-date.tsx b/packages/next/app/components/localized-date.tsx index 65ec1c5..44ad6ec 100644 --- a/packages/next/app/components/localized-date.tsx +++ b/packages/next/app/components/localized-date.tsx @@ -4,6 +4,17 @@ interface ILocalizedDateProps { date: Date; } +/** + * + * this causes hydration issues + * + * Error: Text content does not match server-rendered HTML. + * + * Warning: Text content did not match. Server: "2024-01-01" Client: "2023-12-31" + * + * See more info here: https://nextjs.org/docs/messages/react-hydration-error + */ + export function LocalizedDate ({ date }: ILocalizedDateProps) { const isoDateTime = formatISO(date); const isoDate = formatISO(date, { representation: 'date' }); diff --git a/packages/next/app/components/navbar.tsx b/packages/next/app/components/navbar.tsx index 57fca00..0dcf46a 100644 --- a/packages/next/app/components/navbar.tsx +++ b/packages/next/app/components/navbar.tsx @@ -43,7 +43,7 @@ export default function Navbar() {
diff --git a/packages/next/app/components/vod-page.tsx b/packages/next/app/components/vod-page.tsx index fce06c2..28742b7 100644 --- a/packages/next/app/components/vod-page.tsx +++ b/packages/next/app/components/vod-page.tsx @@ -29,8 +29,8 @@ export function buildMuxThumbnailUrl(playbackId: string, token: string) { export default async function VodPage({vod}: { vod: IVod }) { - console.log('vod page helllo') - console.log(vod) + // console.log('vod page helllo') + // console.log(vod) if (!vod) notFound(); const slug = vod.attributes.vtuber.data.attributes.slug; diff --git a/packages/next/app/vt/[slug]/page.tsx b/packages/next/app/vt/[slug]/page.tsx index c9c5a58..94082d9 100644 --- a/packages/next/app/vt/[slug]/page.tsx +++ b/packages/next/app/vt/[slug]/page.tsx @@ -30,218 +30,218 @@ export default async function Page({ params }: { params: { slug: string } }) { const vods = await getVodsForVtuber(vtuber.id, 1, 9); if (!vods) notFound(); - return '@todo' + // @todo // const missingStreams = await getAllStreamsForVtuber(vtuber.id, ['missing']); // const issueStreams = await getAllStreamsForVtuber(vtuber.id, ['issue']); // const goodStreams = await getAllStreamsForVtuber(vtuber.id, ['good']); -// // return ( -// // <> -// //

hi mom!

-// //
-//   //       
-//   //         {JSON.stringify(missingStreams, null, 2)}
-//   //       
-//   //     
-// // -// // ) +// return ( +// <> +//

hi mom!

+//
+//       
+//         {JSON.stringify(missingStreams, null, 2)}
+//       
+//     
+// +// ) -// return ( -// <> -// {vtuber && ( -// <> -//
+ return ( + <> + {vtuber && ( + <> +
-//
-//
-//

{vtuber.attributes.displayName}

-//
-//
-//
-// {vtuber.attributes.displayName} -//
-//
-//
-//

{vtuber.attributes.description1}

-//

{vtuber.attributes.description2}

-//
-//
+
+
+

{vtuber.attributes.displayName}

+
+
+
+ {vtuber.attributes.displayName} +
+
+
+

{vtuber.attributes.description1}

+

{vtuber.attributes.description2}

+
+
-//

-// Socials -//

+

+ Socials +

-//
-//
-// {vtuber.attributes.patreon && ( -//
-// -// Patreon -// -//
-// )} -// {vtuber.attributes.twitter && ( -//
-// -// Twitter -// -//
-// )} -// {vtuber.attributes.youtube && ( -//
-// -// YouTube -// -//
-// )} -// {vtuber.attributes.twitch && ( -//
-// -// Twitch -// -//
-// )} -// {vtuber.attributes.tiktok && ( -//
-// -// TikTok -// -//
-// )} -// {vtuber.attributes.fansly && ( -//
-// -// Fansly -// -//
-// )} -// {vtuber.attributes.onlyfans && ( -//
-// -// -// -// OnlyFans -// -//
-// )} -// {vtuber.attributes.pornhub && ( -//
-// -// Pornhub -// -//
-// )} -// {vtuber.attributes.reddit && ( -//
-// -// Reddit -// -//
-// )} -// {vtuber.attributes.discord && ( -//
-// -// Discord -// -//
-// )} -// {vtuber.attributes.instagram && ( -//
-// -// Instagram -// -//
-// )} -// {vtuber.attributes.facebook && ( -//
-// -// Facebook -// -//
-// )} -// {vtuber.attributes.merch && ( -//
-// -// Merch -// -//
-// )} -// {vtuber.attributes.chaturbate && ( -//
-// -// Chaturbate -// -//
-// )} -// {vtuber.attributes.throne && ( -//
-// -// Throne -// -//
-// )} -// {vtuber.attributes.linktree && ( -//
-// -// Linktree -// -//
-// )} -// {vtuber.attributes.carrd && ( -//
-// -// Carrd -// -//
-// )} -//
-//
+
+
+ {vtuber.attributes.patreon && ( +
+ + Patreon + +
+ )} + {vtuber.attributes.twitter && ( +
+ + Twitter + +
+ )} + {vtuber.attributes.youtube && ( +
+ + YouTube + +
+ )} + {vtuber.attributes.twitch && ( +
+ + Twitch + +
+ )} + {vtuber.attributes.tiktok && ( +
+ + TikTok + +
+ )} + {vtuber.attributes.fansly && ( +
+ + Fansly + +
+ )} + {vtuber.attributes.onlyfans && ( +
+ + + + OnlyFans + +
+ )} + {vtuber.attributes.pornhub && ( +
+ + Pornhub + +
+ )} + {vtuber.attributes.reddit && ( +
+ + Reddit + +
+ )} + {vtuber.attributes.discord && ( +
+ + Discord + +
+ )} + {vtuber.attributes.instagram && ( +
+ + Instagram + +
+ )} + {vtuber.attributes.facebook && ( +
+ + Facebook + +
+ )} + {vtuber.attributes.merch && ( +
+ + Merch + +
+ )} + {vtuber.attributes.chaturbate && ( +
+ + Chaturbate + +
+ )} + {vtuber.attributes.throne && ( +
+ + Throne + +
+ )} + {vtuber.attributes.linktree && ( +
+ + Linktree + +
+ )} + {vtuber.attributes.carrd && ( +
+ + Carrd + +
+ )} +
+
-// {/*

-// Toys -//

+ {/*

+ Toys +

-// <> -// -// {(toys.pagination.total > toySampleCount) && See all of {vtuber.displayName}'s toys} -// */} + <> + + {(toys.pagination.total > toySampleCount) && See all of {vtuber.displayName}'s toys} + */} -//

-// Vods -//

+

+ Vods +

-// -// { -// (vtuber.attributes.vods) ? ( -// See all {vtuber.attributes.displayName} vods -// ) : (

No VODs have been added, yet.

) -// } + + { + (vtuber.attributes.vods) ? ( + See all {vtuber.attributes.displayName} vods + ) : (

No VODs have been added, yet.

) + } -//

-// Streams -//

-// -// {/* -//

-// Archive Progress -//

-// */} + {/*

+ Streams +

*/} + {/* */} +{/* +

+ Archive Progress +

+ */} -//
-// -// )} -// -// ); +
+ + )} + + ); }