feat: enhance mobile and desktop sidebar with ActiveClubSwitcher component
- Integrated ActiveClubSwitcher into both mobile and desktop sidebar layouts, improving club selection functionality. - Updated app header styles for better mobile responsiveness and layout. - Adjusted desktop sidebar footer styles for improved alignment and spacing.
This commit is contained in:
1 parent
f48b573a63
commit
413a096432
4 files changed
+128
-35
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { NavLink, useLocation } from 'react-router-dom'
|
||||
import { LogOut } from 'lucide-react'
|
||||
import { getMainNavItems } from '../config/appNav'
|
||||
import ActiveClubSwitcher from './ActiveClubSwitcher'
|
||||
|
||||
function sidebarLinkActive(pathname, item, routerIsActive) {
|
||||
if (item.to.startsWith('/admin')) return pathname.startsWith('/admin')
|
||||
@@ -46,40 +47,43 @@ export default function DesktopSidebar({
|
||||
</nav>
|
||||
|
||||
<div className="desktop-sidebar__footer">
|
||||
<div className="desktop-sidebar__user">
|
||||
<div
|
||||
style={{
|
||||
width: 32,
|
||||
height: 32,
|
||||
borderRadius: '50%',
|
||||
background: 'var(--accent)',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
color: 'white',
|
||||
fontWeight: 600,
|
||||
fontSize: '14px'
|
||||
}}
|
||||
<ActiveClubSwitcher variant="sidebar" />
|
||||
<div className="desktop-sidebar__footer-row">
|
||||
<div className="desktop-sidebar__user">
|
||||
<div
|
||||
style={{
|
||||
width: 32,
|
||||
height: 32,
|
||||
borderRadius: '50%',
|
||||
background: 'var(--accent)',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
color: 'white',
|
||||
fontWeight: 600,
|
||||
fontSize: '14px'
|
||||
}}
|
||||
>
|
||||
{(user?.name || user?.email || '?').trim().slice(0, 1).toUpperCase()}
|
||||
</div>
|
||||
<div className="desktop-sidebar__user-text">
|
||||
<span className="desktop-sidebar__user-name">
|
||||
{user?.name || user?.email || 'User'}
|
||||
</span>
|
||||
{tier ? (
|
||||
<span className="desktop-sidebar__user-tier">{tier}</span>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
className="desktop-sidebar__logout"
|
||||
onClick={onLogout}
|
||||
title="Abmelden"
|
||||
>
|
||||
{(user?.name || user?.email || '?').trim().slice(0, 1).toUpperCase()}
|
||||
</div>
|
||||
<div className="desktop-sidebar__user-text">
|
||||
<span className="desktop-sidebar__user-name">
|
||||
{user?.name || user?.email || 'User'}
|
||||
</span>
|
||||
{tier ? (
|
||||
<span className="desktop-sidebar__user-tier">{tier}</span>
|
||||
) : null}
|
||||
</div>
|
||||
<LogOut size={18} />
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
className="desktop-sidebar__logout"
|
||||
onClick={onLogout}
|
||||
title="Abmelden"
|
||||
>
|
||||
<LogOut size={18} />
|
||||
</button>
|
||||
</div>
|
||||
</aside>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user