Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions src/app/(app)/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
.eq('id', user.id)
.maybeSingle();

const isNewUser = (profile?.xp ?? 0) === 0 && (profile?.github_total_merges ?? 0) === 0;

return (
<div className="min-h-screen bg-[#111318] p-12 font-mono text-white">
<div className="mx-auto max-w-6xl">
Expand All @@ -60,6 +62,46 @@
<StatsRow userId={user.id} profile={profile} />
</Suspense>

{/* Getting Started — shown only to new users with 0 XP and 0 merges */}
{isNewUser && (
<div className="mb-12 rounded-2xl border border-zinc-800 bg-zinc-900 p-6">
<h2 className="mb-3 text-lg font-bold text-white">Getting Started</h2>
<p className="mb-4 text-sm text-zinc-400">
Welcome! Here&apos;s how to earn your first XP on MergeShip.
</p>
<ol className="space-y-2 text-sm text-zinc-300">
<li className="flex items-start gap-2">
<span className="mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-zinc-800 text-[10px] text-zinc-400">
1
</span>
<span>
Connect your GitHub account via the{' '}
<a href="/settings/profile" className="text-green-400 underline">

Check failure on line 79 in src/app/(app)/dashboard/page.tsx

View workflow job for this annotation

GitHub Actions / check

Do not use an `<a>` element to navigate to `/settings/profile/`. Use `<Link />` from `next/link` instead. See: https://nextjs.org/docs/messages/no-html-link-for-pages
settings page
</a>
</span>
</li>
<li className="flex items-start gap-2">
<span className="mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-zinc-800 text-[10px] text-zinc-400">
2
</span>
<span>
Browse and claim an issue from the{' '}
<a href="/issues" className="text-green-400 underline">

Check failure on line 90 in src/app/(app)/dashboard/page.tsx

View workflow job for this annotation

GitHub Actions / check

Do not use an `<a>` element to navigate to `/issues/`. Use `<Link />` from `next/link` instead. See: https://nextjs.org/docs/messages/no-html-link-for-pages
Issues page
</a>
</span>
</li>
<li className="flex items-start gap-2">
<span className="mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-zinc-800 text-[10px] text-zinc-400">
3
</span>
<span>Submit a PR and get it merged to earn XP</span>
</li>
</ol>
</div>
)}

{/* Main Columns */}
<div className="grid grid-cols-1 gap-16 lg:grid-cols-2">
{/* Left Column */}
Expand Down
Loading