Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

add link to leaderboard on submission screen (#1671)

Amanuel Odichofd6f38540ffb
diff --git a/apps/aot/src/app/events/[year]/[day]/submissions/[[...catchAll]]/_components/overview.tsx b/apps/aot/src/app/events/[year]/[day]/submissions/[[...catchAll]]/_components/overview.tsx
index 7fa67530..a56f328f 100644
--- a/apps/aot/src/app/events/[year]/[day]/submissions/[[...catchAll]]/_components/overview.tsx
+++ b/apps/aot/src/app/events/[year]/[day]/submissions/[[...catchAll]]/_components/overview.tsx
@@ -8,7 +8,7 @@ import {
} from '@repo/ui/components/dialog';
import { Markdown } from '@repo/ui/components/markdown';
import { Tooltip, TooltipContent, TooltipTrigger } from '@repo/ui/components/tooltip';
-import { CheckCircle2, Share, Twitter, X, XCircle } from '@repo/ui/icons';
+import { CheckCircle2, Share, Twitter, X, XCircle, Trophy } from '@repo/ui/icons';
import { useQuery } from '@tanstack/react-query';
import Link from 'next/link';
import { useParams, useSearchParams } from 'next/navigation';
@@ -116,6 +116,16 @@ export function SubmissionOverview({ submissionId }: Props) {
Share on Twitter
</a>
</Button>
+ <Button
+ asChild
+ className="flex items-center gap-2 rounded-xl border-2 px-4 py-2 dark:text-white"
+ variant="outline"
+ >
+ <Link href={`/events/${year}/leaderboard/${day}`} className="gap-1 md:inline-flex">
+ <Trophy className="h-4 w-4" />
+ Leaderboard
+ </Link>
+ </Button>
<Button asChild variant="outline" className="fancy-border-gradient relative border-none">
<Link href={`/events/${year}`}>Back to Advent of TypeScript</Link>
</Button>
diff --git a/packages/ui/src/icons.ts b/packages/ui/src/icons.ts
index 8f2e1e55..32d6a7aa 100644
--- a/packages/ui/src/icons.ts
+++ b/packages/ui/src/icons.ts
@@ -88,6 +88,7 @@ export {
X,
XCircle,
Text,
+ Trophy,
type LucideIcon,
} from 'lucide-react';
export { Github } from './icons/github';