Commit
align history, signin, and error pages with landing typography
commit
22b6f2f
4 changed files with +45 and −49
Jump to a changed file
- src/app/error.tsx +2 −1
- src/app/history/page.tsx +12 −15
- src/app/not-found.tsx +2 −2
- src/app/signin/page.tsx +29 −31
modified src/app/error.tsx +2 −1
| @@ -11,7 +11,8 @@export default function Error({ error, reset }: { error: Error & { digest?: stri | ||
| 11 | 11 | |
| 12 | 12 | return ( |
| 13 | 13 | <div className="container flex min-h-[60vh] flex-col items-center justify-center gap-4 text-center"> |
| 14 | - <h1 className="text-2xl font-semibold">Something went wrong</h1> | |
| 14 | + <p className="font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground">error</p> | |
| 15 | + <h1 className="font-display text-3xl font-medium tracking-tight">Something went wrong.</h1> | |
| 15 | 16 | <p className="max-w-md text-sm text-muted-foreground"> |
| 16 | 17 | An unexpected error occurred while loading this page. You can try again, or head back home. |
| 17 | 18 | </p> |
modified src/app/history/page.tsx +12 −15
| @@ -1,4 +1,3 @@ | ||
| 1 | -import { History, Wallet } from 'lucide-react'; | |
| 2 | 1 | import Link from 'next/link'; |
| 3 | 2 | import { auth, signIn } from '@/auth'; |
| 4 | 3 | import { HistoryList } from '@/components/history-list'; |
| @@ -16,9 +15,9 @@export default async function HistoryPage() { | ||
| 16 | 15 | if (!userId) { |
| 17 | 16 | return ( |
| 18 | 17 | <div className="container flex flex-col items-center gap-4 py-24 text-center"> |
| 19 | - <History className="h-10 w-10 text-muted-foreground" /> | |
| 20 | - <h1 className="text-2xl font-semibold">Your debate history</h1> | |
| 21 | - <p className="max-w-md text-sm text-muted-foreground"> | |
| 18 | + <p className="font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground">history</p> | |
| 19 | + <h1 className="font-display text-3xl font-medium tracking-tight">Every debate, kept.</h1> | |
| 20 | + <p className="max-w-md text-sm leading-relaxed text-muted-foreground"> | |
| 22 | 21 | Sign in to keep a searchable, replayable history of every debate you run. |
| 23 | 22 | </p> |
| 24 | 23 | {isGithubAuthConfigured ? ( |
| @@ -46,19 +45,17 @@export default async function HistoryPage() { | ||
| 46 | 45 | const [debates, spend] = await Promise.all([listDebates(userId), monthlySpendUsd(userId)]); |
| 47 | 46 | |
| 48 | 47 | return ( |
| 49 | - <div className="container max-w-4xl py-8"> | |
| 50 | - <div className="mb-6 flex flex-wrap items-end justify-between gap-3"> | |
| 51 | - <div> | |
| 52 | - <h1 className="flex items-center gap-2 text-2xl font-semibold"> | |
| 53 | - <History className="h-6 w-6 text-primary" /> History | |
| 48 | + <div className="container max-w-4xl py-12"> | |
| 49 | + <div className="mb-8 flex flex-wrap items-end justify-between gap-3 border-b pb-6"> | |
| 50 | + <div className="space-y-1.5"> | |
| 51 | + <p className="font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground">history</p> | |
| 52 | + <h1 className="font-display text-3xl font-medium tracking-tight"> | |
| 53 | + {debates.length} {debates.length === 1 ? 'debate' : 'debates'} | |
| 54 | 54 | </h1> |
| 55 | - <p className="text-sm text-muted-foreground">{debates.length} debates</p> | |
| 56 | 55 | </div> |
| 57 | - <div className="rounded-lg border bg-card px-4 py-2 text-right"> | |
| 58 | - <div className="flex items-center gap-1.5 text-xs text-muted-foreground"> | |
| 59 | - <Wallet className="h-3.5 w-3.5" /> This month | |
| 60 | - </div> | |
| 61 | - <div className="text-lg font-semibold">{formatUsd(spend)}</div> | |
| 56 | + <div className="text-right"> | |
| 57 | + <div className="font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground">this month</div> | |
| 58 | + <div className="mt-1 font-display text-2xl font-medium">{formatUsd(spend)}</div> | |
| 62 | 59 | </div> |
| 63 | 60 | </div> |
| 64 | 61 | <HistoryList debates={debates} /> |
modified src/app/not-found.tsx +2 −2
| @@ -4,8 +4,8 @@import { Button } from '@/components/ui/button'; | ||
| 4 | 4 | export default function NotFound() { |
| 5 | 5 | return ( |
| 6 | 6 | <div className="container flex min-h-[60vh] flex-col items-center justify-center gap-4 text-center"> |
| 7 | - <p className="text-xs font-medium uppercase tracking-widest text-muted-foreground">404</p> | |
| 8 | - <h1 className="text-3xl font-semibold">This page wandered off</h1> | |
| 7 | + <p className="font-mono text-xs uppercase tracking-[0.22em] text-muted-foreground">404</p> | |
| 8 | + <h1 className="font-display text-3xl font-medium tracking-tight">This page wandered off.</h1> | |
| 9 | 9 | <p className="max-w-md text-muted-foreground"> |
| 10 | 10 | The debate, demo, or page you were looking for does not exist or has been removed. |
| 11 | 11 | </p> |
modified src/app/signin/page.tsx +29 −31
| @@ -3,7 +3,6 @@import Link from 'next/link'; | ||
| 3 | 3 | import { redirect } from 'next/navigation'; |
| 4 | 4 | import { auth, signIn } from '@/auth'; |
| 5 | 5 | import { Button } from '@/components/ui/button'; |
| 6 | -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; | |
| 7 | 6 | import { isGithubAuthConfigured } from '@/lib/env'; |
| 8 | 7 | |
| 9 | 8 | export const dynamic = 'force-dynamic'; |
| @@ -14,37 +13,36 @@export default async function SignInPage() { | ||
| 14 | 13 | |
| 15 | 14 | return ( |
| 16 | 15 | <div className="container flex min-h-[70vh] items-center justify-center py-12"> |
| 17 | - <Card className="w-full max-w-sm"> | |
| 18 | - <CardHeader className="items-center text-center"> | |
| 19 | - <GitCompareArrows className="mb-2 h-8 w-8 text-primary" /> | |
| 20 | - <CardTitle>Sign in to Roundtable</CardTitle> | |
| 21 | - </CardHeader> | |
| 22 | - <CardContent className="space-y-4"> | |
| 23 | - {isGithubAuthConfigured ? ( | |
| 24 | - <form | |
| 25 | - action={async () => { | |
| 26 | - 'use server'; | |
| 27 | - await signIn('github', { redirectTo: '/history' }); | |
| 28 | - }} | |
| 29 | - > | |
| 30 | - <Button type="submit" className="w-full"> | |
| 31 | - <Github className="h-4 w-4" /> Continue with GitHub | |
| 32 | - </Button> | |
| 33 | - </form> | |
| 34 | - ) : ( | |
| 35 | - <p className="text-center text-sm text-muted-foreground"> | |
| 36 | - GitHub authentication isn't configured on this deployment. You can still run debates without an account. | |
| 37 | - </p> | |
| 38 | - )} | |
| 39 | - <p className="text-center text-xs text-muted-foreground"> | |
| 40 | - Prefer no account?{' '} | |
| 41 | - <Link href="/debate" className="text-primary hover:underline"> | |
| 42 | - Run a debate with a session-only key | |
| 43 | - </Link> | |
| 44 | - . | |
| 16 | + <div className="w-full max-w-sm space-y-6 text-center"> | |
| 17 | + <GitCompareArrows className="mx-auto h-8 w-8 text-primary" /> | |
| 18 | + <div className="space-y-2"> | |
| 19 | + <h1 className="font-display text-2xl font-medium tracking-tight">Sign in to Roundtable</h1> | |
| 20 | + <p className="text-sm text-muted-foreground">Keep a replayable history of every debate you run.</p> | |
| 21 | + </div> | |
| 22 | + {isGithubAuthConfigured ? ( | |
| 23 | + <form | |
| 24 | + action={async () => { | |
| 25 | + 'use server'; | |
| 26 | + await signIn('github', { redirectTo: '/history' }); | |
| 27 | + }} | |
| 28 | + > | |
| 29 | + <Button type="submit" className="w-full"> | |
| 30 | + <Github className="h-4 w-4" /> Continue with GitHub | |
| 31 | + </Button> | |
| 32 | + </form> | |
| 33 | + ) : ( | |
| 34 | + <p className="text-sm text-muted-foreground"> | |
| 35 | + GitHub authentication isn't configured on this deployment. You can still run debates without an account. | |
| 45 | 36 | </p> |
| 46 | - </CardContent> | |
| 47 | - </Card> | |
| 37 | + )} | |
| 38 | + <p className="text-xs text-muted-foreground"> | |
| 39 | + Prefer no account?{' '} | |
| 40 | + <Link href="/debate" className="text-primary hover:underline"> | |
| 41 | + Run a debate with a session-only key | |
| 42 | + </Link> | |
| 43 | + . | |
| 44 | + </p> | |
| 45 | + </div> | |
| 48 | 46 | </div> |
| 49 | 47 | ); |
| 50 | 48 | } |