Skip to content

Commit 0d21d85

Browse files
committed
refactor: migrate dashboard routes from dynamic segments to explicit /dashboard/[username] directory structure
1 parent 81c071c commit 0d21d85

7 files changed

Lines changed: 5 additions & 5 deletions

File tree

File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export async function generateMetadata({
3535
openGraph: {
3636
title,
3737
description,
38-
url: `${BASE_URL}/${username}`,
38+
url: `${BASE_URL}/dashboard/${username}`,
3939
siteName: 'CommitPulse',
4040
images: [{ url: ogImage, width: 1200, height: 630, alt: title }],
4141
type: 'profile',

app/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export default function LandingPage() {
211211
</AnimatePresence>
212212
</button>
213213
<Link
214-
href={hasUsername ? `/${trimmedUsername}` : '/'}
214+
href={hasUsername ? `/dashboard/${trimmedUsername}` : '/'}
215215
aria-disabled={!hasUsername}
216216
onClick={(e) => {
217217
if (!hasUsername) e.preventDefault();
@@ -456,7 +456,7 @@ function SuccessGuide({
456456
monolith&apos;s colour palette.
457457
</p>
458458
<div className="mt-8 flex justify-center border-t border-white/5 pt-6">
459-
<Link href={`/${username}`}>
459+
<Link href={`/dashboard/${username}`}>
460460
<button className="bg-white text-black hover:bg-zinc-100 px-6 py-2.5 rounded-lg text-sm font-semibold transition-all duration-200 hover:scale-[1.01] active:scale-[0.99]">
461461
Watch Your Dashboard
462462
</button>

components/dashboard/ShareSheet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ type OptionState = 'idle' | 'loading' | 'success' | 'error';
4040

4141
const PROFILE_URL = (username: string) =>
4242
typeof window !== 'undefined'
43-
? `${window.location.origin}/${username}`
44-
: `https://commitpulse.vercel.app/${username}`;
43+
? `${window.location.origin}/dashboard/${username}`
44+
: `https://commitpulse.vercel.app/dashboard/${username}`;
4545

4646
export default function ShareSheet({ username, isOpen, onClose, exportData }: ShareSheetProps) {
4747
const [states, setStates] = useState<Record<string, OptionState>>({});

0 commit comments

Comments
 (0)