refine: show only avatar circle on homepage hero when logged in, remove username text
This commit is contained in:
parent
c44cebeb18
commit
a7759c5767
|
|
@ -181,11 +181,10 @@ function HeroSection() {
|
||||||
{showThemeToggle && <HomeThemeToggle />}
|
{showThemeToggle && <HomeThemeToggle />}
|
||||||
{showLanguageSelector && <HomeLanguageSelector />}
|
{showLanguageSelector && <HomeLanguageSelector />}
|
||||||
{userState.user ? (
|
{userState.user ? (
|
||||||
<Link to="/console" className="inline-flex items-center gap-2 bg-white/10 text-white px-3 py-1.5 text-sm rounded-full hover:bg-white/20 border border-white/20 transition-colors duration-200 ml-2">
|
<Link to="/console" className="inline-flex items-center justify-center w-8 h-8 rounded-full hover:bg-white/20 border border-white/20 transition-colors duration-200 ml-2" title={userState.user.display_name || userState.user.username}>
|
||||||
<span className="w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold text-white flex-shrink-0" style={{ backgroundColor: stringToColor(userState.user.username) }}>
|
<span className="w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold text-white" style={{ backgroundColor: stringToColor(userState.user.username) }}>
|
||||||
{userState.user.username?.charAt(0).toUpperCase()}
|
{userState.user.username?.charAt(0).toUpperCase()}
|
||||||
</span>
|
</span>
|
||||||
<span className="hidden sm:inline max-w-[100px] truncate text-sm font-medium">{userState.user.display_name || userState.user.username}</span>
|
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<Link to="/login" className="inline-flex items-center bg-white text-black px-4 py-1.5 text-sm font-mono font-medium uppercase tracking-widest rounded hover:bg-transparent hover:text-white border border-white transition-colors duration-200 ml-2">
|
<Link to="/login" className="inline-flex items-center bg-white text-black px-4 py-1.5 text-sm font-mono font-medium uppercase tracking-widest rounded hover:bg-transparent hover:text-white border border-white transition-colors duration-200 ml-2">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue