File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';
55import { Bai_Jamjuree , Inter } from 'next/font/google' ;
66import { type Metadata } from 'next' ;
77import { GoogleAnalytics } from '@next/third-parties/google' ;
8+ import Link from 'next/link' ;
89
910import theme from '@src/utils/theme' ;
1011
@@ -59,6 +60,11 @@ export default function RootLayout({
5960 { process . env . NEXT_PUBLIC_VERCEL_ENV === 'production' && (
6061 < GoogleAnalytics gaId = "G-3NDS0P32CZ" />
6162 ) }
63+ < nav >
64+ < Link href = "/profile" className = "px-3 py-1 hover:underline" >
65+ Profile
66+ </ Link >
67+ </ nav >
6268 </ body >
6369 </ html >
6470 ) ;
Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
3+ import Avatar from '@mui/material/Avatar' ;
4+ import Link from 'next/link' ;
5+
6+ export default function ProfilePage ( ) {
7+ const user = {
8+ name : 'John Doe' ,
9+ handle : '@johndoe' ,
10+ 11+ avatar : '/images/avatar.jpg' ,
12+ posts : 0 ,
13+ reports_submitted : 0 ,
14+ } ;
15+
16+ return (
17+ < main className = "min-h-screen p-8" >
18+ < div className = "mx-auto max-w-4xl" >
19+ < div className = "flex items-center gap-6" >
20+ < Avatar
21+ alt = { user . name }
22+ src = { user . avatar }
23+ sx = { { width : 96 , height : 96 } }
24+ />
25+ < div >
26+ < h1 className = "text-2xl font-semibold" > { user . name } </ h1 >
27+ < div className = "text-sm text-white" > { user . handle } </ div >
28+ < p className = "mt-2 text-white" > { user . email } </ p >
29+ < div className = "mt-4 flex gap-4 text-sm text-white" >
30+ < div >
31+ < strong className = "font-bold" > { user . posts } </ strong > posts
32+ </ div >
33+ < div >
34+ < strong className = "font-bold" > { user . reports_submitted } </ strong > { ' ' }
35+ reports submitted
36+ </ div >
37+ </ div >
38+ </ div >
39+ < div className = "ml-auto flex items-center gap-3" >
40+ < Link
41+ href = "/profile/edit"
42+ className = "rounded-md px-4 py-2 text-white"
43+ >
44+ Edit Profile
45+ </ Link >
46+ </ div >
47+ </ div >
48+ < h2 className = "mt-10 text-xl font-semibold" > Saved Notes:</ h2 >
49+ < h2 className = "mt-10 text-xl font-semibold" > Uploaded Notes:</ h2 >
50+ </ div >
51+ </ main >
52+ ) ;
53+ }
You can’t perform that action at this time.
0 commit comments