22
33import { useEffect , useState } from 'react'
44import { useParams , useRouter } from 'next/navigation'
5+ import Link from 'next/link'
56import type { UserRepoSummary } from '@/lib/types'
67import UserDashboard from '@/components/UserDashboard'
7- import ReadmeBadge from '@/components/ReadmeBadge '
8+ import LoadingState from '@/components/LoadingState '
89import SiteFooter from '@/components/SiteFooter'
910import PageHero from '@/components/PageHero'
1011
@@ -37,6 +38,23 @@ export default function UserPage() {
3738 < main className = "page-shell-main" >
3839 < div className = "page-shell-inner" >
3940
41+ < div style = { { paddingBottom : '4px' , marginBottom : '2px' } } >
42+ < Link
43+ href = "/"
44+ aria-label = "Back to home"
45+ className = "subpage-back-link alive-interactive"
46+ style = { {
47+ fontFamily : MONO , display : 'inline-flex' , alignItems : 'center' , gap : '5px' ,
48+ color : '#9a9288' , textDecoration : 'none' , fontSize : '11px' , fontWeight : 400 ,
49+ letterSpacing : '0.06em' , WebkitTapHighlightColor : 'transparent' , transition : 'color 0.15s' ,
50+ } }
51+ onMouseEnter = { e => { ( e . currentTarget as HTMLAnchorElement ) . style . color = '#1a1a1a' } }
52+ onMouseLeave = { e => { ( e . currentTarget as HTMLAnchorElement ) . style . color = '#9a9288' } }
53+ >
54+ ← home
55+ </ Link >
56+ </ div >
57+
4058 < PageHero
4159 title = "Certificate of Death"
4260 subtitle = {
@@ -53,37 +71,25 @@ export default function UserPage() {
5371 </ span >
5472 }
5573 brandHref = "/"
56- hideEmoji = { false }
5774 />
5875
59- { loading && (
60- < div style = { { textAlign : 'center' , padding : '48px 0' , display : 'flex' , flexDirection : 'column' , alignItems : 'center' , gap : '16px' } } >
61- < div style = { { fontSize : '48px' , lineHeight : 1 , animation : 'loading-float 1.8s ease-in-out infinite' } } > 🪦</ div >
62- < p style = { { fontFamily : MONO , fontSize : '11px' , color : '#8a8a8a' , letterSpacing : '0.1em' , margin : 0 } } > reviewing case files...</ p >
63- < style > { `@keyframes loading-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }` } </ style >
64- </ div >
65- ) }
76+ { loading && < LoadingState /> }
6677
6778 { error && (
6879 < div style = { { textAlign : 'center' , padding : '40px 0' } } >
6980 < p style = { { fontFamily : MONO , fontSize : '13px' , color : '#8B0000' , marginBottom : '20px' } } > { error } </ p >
7081 < button
7182 onClick = { ( ) => router . push ( '/' ) }
72- style = { { fontFamily : MONO , fontSize : '13px' , fontWeight : 600 , background : 'none' , border : 'none' , textDecoration : 'underline' , color : '#160A06' , cursor : 'pointer' , minHeight : '44px' , padding : '10px 0' } }
83+ style = { { fontFamily : MONO , fontSize : '13px' , fontWeight : 700 , background : 'none' , border : 'none' , textDecoration : 'underline' , textUnderlineOffset : '3px ', color : '#160A06' , cursor : 'pointer' , minHeight : '44px' , padding : '10px 0' } }
7384 >
7485 ← examine another subject
7586 </ button >
7687 </ div >
7788 ) }
7889
79- { repos && ! loading && (
80- < >
81- < ReadmeBadge username = { username } />
82- < UserDashboard repos = { repos } username = { username } />
83- </ >
84- ) }
90+ { repos && ! loading && < UserDashboard repos = { repos } username = { username } /> }
8591
86- < SiteFooter compact = { false } />
92+ < SiteFooter />
8793 </ div >
8894 </ main >
8995 )
0 commit comments