Revert "feat(#112): add admin header bar with back button and logout"

This reverts commit a484364029.
This commit is contained in:
hsiegeln
2026-04-02 17:22:06 +02:00
parent f00a3e8b97
commit 3f8a9715a4
2 changed files with 1 additions and 93 deletions

View File

@@ -1,8 +1,5 @@
import { Outlet, useNavigate, useLocation } from 'react-router';
import { Tabs } from '@cameleer/design-system';
import { ArrowLeft, LogOut } from 'lucide-react';
import { useAuthStore } from '../../auth/auth-store';
import styles from './AdminLayout.module.css';
const ADMIN_TABS = [
{ label: 'User Management', value: '/admin/rbac' },
@@ -16,35 +13,15 @@ const ADMIN_TABS = [
export default function AdminLayout() {
const navigate = useNavigate();
const location = useLocation();
const { username, logout } = useAuthStore();
const handleBack = () => navigate('/exchanges');
const handleLogout = () => {
logout();
navigate('/login');
};
return (
<div>
<header className={styles.header}>
<button className={styles.backBtn} onClick={handleBack}>
<ArrowLeft size={16} />
Back
</button>
<span className={styles.title}>Admin</span>
<div className={styles.userSection}>
<span className={styles.username}>{username}</span>
<button className={styles.logoutBtn} onClick={handleLogout}>
<LogOut size={14} />
</button>
</div>
</header>
<Tabs
tabs={ADMIN_TABS}
active={location.pathname}
onChange={(path) => navigate(path)}
/>
<div className={styles.content}>
<div style={{ padding: '20px 24px 40px' }}>
<Outlet />
</div>
</div>