From 2dbb64b452cdf376cb7bbc56a1d0cf53ce43bc65 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange Date: Thu, 25 Apr 2024 16:56:02 -0500 Subject: [PATCH] Orphaned submission fix --- src/app/jams/content/[content]/page.tsx | 4 ++-- src/app/jams/user/[user]/page.tsx | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/jams/content/[content]/page.tsx b/src/app/jams/content/[content]/page.tsx index 822030c..473541a 100644 --- a/src/app/jams/content/[content]/page.tsx +++ b/src/app/jams/content/[content]/page.tsx @@ -88,12 +88,12 @@ export default async function Home({

{content.name}

{content.url}

-

Submitted by {`${contentOwner.username}@${contentOwner.instance}`} to {submittedJam.name} - {new Date(parseInt(content.submitted)).toDateString()}

+

Submitted by {`${contentOwner.username}@${contentOwner.instance}`} to {submittedJam?.name} - {new Date(parseInt(content.submitted)).toDateString()}

Submitted by {`${contentOwner.username}@${contentOwner.instance}`} {new Date(parseInt(content.submitted)).toDateString()}

- +

WINNER!

{content.description}

diff --git a/src/app/jams/user/[user]/page.tsx b/src/app/jams/user/[user]/page.tsx index 6277655..7b40e1d 100644 --- a/src/app/jams/user/[user]/page.tsx +++ b/src/app/jams/user/[user]/page.tsx @@ -146,13 +146,18 @@ export default async function Home({ .selectAll() .executeTakeFirst() as unknown as JSONJamTable; - if (submittedJam == null) return

An error occured.

; + // if (submittedJam == null) return

An error occured.

; return (

{content.name}

-

Submitted {new Date(parseInt(content.submitted)).toDateString()} to {submittedJam.name}

+ +

Submitted to {submittedJam?.name} - {new Date(parseInt(content.submitted)).toDateString()}

+
+ +

Submitted on {new Date(parseInt(content.submitted)).toDateString()}

+

{content.description}

); })} @@ -187,7 +192,7 @@ export default async function Home({ margin: "16px 0" }}>

{`${judgementOwner.username}@${judgementOwner.instance}`}

-

Published {new Date(parseInt(judgement.published)).toDateString()} on {submittedContent.name}

+

Published on {new Date(parseInt(judgement.published)).toDateString()} on {submittedContent.name}

{judgement.content}

); })}