Connect, collaborate, and grow with a community of TypeScript developers
fix: scuffed
bautistaaa388479c0a057
diff --git a/apps/web/src/app/[locale]/_components/countdown-timer.tsx b/apps/web/src/app/[locale]/_components/countdown-timer.tsxindex 4193bee5..9bbbb9f8 100644--- a/apps/web/src/app/[locale]/_components/countdown-timer.tsx+++ b/apps/web/src/app/[locale]/_components/countdown-timer.tsx@@ -15,6 +15,7 @@ const DateCard = ({ date, label }: { date: React.ReactNode; label: string }) =>};export const CountdownTimer = () => {+ const december25th2023 = new Date(Date.UTC(2023, 11, 25));const [releaseDate, setReleaseDate] = useState(() => {return calculateNextReleaseTime();});@@ -46,7 +47,7 @@ export const CountdownTimer = () => {const { days, hours, minutes, seconds } = calculateTimeComponents(remainingTime);- if (remainingTime === 0 || releaseDate.getUTCDate() > 25) {+ if (remainingTime === 0 || releaseDate > december25th2023) {return (<><p className="text-center text-xl font-semibold">Thats a wrap! See you next year!</p>diff --git a/apps/web/src/app/[locale]/challenge/[slug]/submissions/[[...catchAll]]/_components/overview.tsx b/apps/web/src/app/[locale]/challenge/[slug]/submissions/[[...catchAll]]/_components/overview.tsxindex 68b7031e..4725b3e0 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/submissions/[[...catchAll]]/_components/overview.tsx+++ b/apps/web/src/app/[locale]/challenge/[slug]/submissions/[[...catchAll]]/_components/overview.tsx@@ -60,6 +60,14 @@ export function SubmissionOverview({ submissionId }: Props) {});};+ const tweet = isAotChallenge+ ? `https://twitter.com/intent/tweet?text=${encodeURIComponent(+ `I've completed ${submission?.challenge.name} - Advent of TypeScript 2023`,+ )}&url=https://typehero.dev/challenge/${slug}&hashtags=AdventOfTypescript`+ : `https://twitter.com/intent/tweet?text=${encodeURIComponent(+ `I've completed ${submission?.challenge.name} on TypeHero!`,+ )}&url=https://typehero.dev/challenge/${slug}`;+if (!submission) return null;return (@@ -118,52 +126,25 @@ export function SubmissionOverview({ submissionId }: Props) {<Share className="h-4 w-4" />Share Code on Playground</Button>+ <Button+ asChild+ className="flex items-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white"+ variant="outline"+ >+ <a target="_blank" rel="noreferrer" className="gap-1 md:inline-flex" href={tweet}>+ <Twitter className="h-4 w-4" />+ Share on Twitter+ </a>+ </Button>{isAotChallenge ? (- <>- <Button- asChild- className="flex items-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white"- variant="outline"- >- <a- target="_blank"- rel="noreferrer"- className="gap-1 md:inline-flex"- href={`https://twitter.com/intent/tweet?text=${encodeURIComponent(- `I've completed ${submission.challenge.name} - Advent of TypeScript 2023`,- )}&url=https://typehero.dev/challenge/${slug}&hashtags=AdventOfTypescript`}- >- <Twitter className="h-4 w-4" />- Share on Twitter- </a>- </Button>- <Button- asChild- variant="outline"- className="fancy-border-gradient relative border-none"- >- <Link href="/aot-2023">Back to Advent of TypeScript</Link>- </Button>- </>- ) : (<ButtonasChild- className="flex items-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white"variant="outline"+ className="fancy-border-gradient relative border-none">- <a- target="_blank"- rel="noreferrer"- className="gap-1 md:inline-flex"- href={`https://twitter.com/intent/tweet?text=${encodeURIComponent(- `I've completed ${submission.challenge.name} on TypeHero!`,- )}&url=https://typehero.dev/challenge/${slug}`}- >- <Twitter className="h-4 w-4" />- Share on Twitter- </a>+ <Link href="/aot-2023">Back to Advent of TypeScript</Link></Button>- )}+ ) : null}</div></div></>