2025-11-26 14:22:01 +07:00
|
|
|
import { FC, ReactElement, useState } from 'react';
|
2025-11-26 10:18:36 +07:00
|
|
|
import { Outlet } from 'react-router';
|
2025-11-26 14:22:01 +07:00
|
|
|
import { Sidebar } from '../../../components/sidebar';
|
2025-11-26 10:18:36 +07:00
|
|
|
|
2025-11-26 14:22:01 +07:00
|
|
|
const UserDetailLayout: FC = (): ReactElement => {
|
|
|
|
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
2025-11-26 10:18:36 +07:00
|
|
|
|
|
|
|
|
return (
|
2025-11-26 15:25:23 +07:00
|
|
|
<div className="flex min-h-screen bg-gray-50 dark:bg-neutral-950">
|
2025-11-26 14:22:01 +07:00
|
|
|
<Sidebar isOpen={sidebarOpen} onClose={() => setSidebarOpen(false)} />
|
|
|
|
|
|
|
|
|
|
<div className="flex-1 flex flex-col overflow-auto">
|
|
|
|
|
{/* Mobile Header with Hamburger */}
|
2025-11-26 15:25:23 +07:00
|
|
|
<div className="lg:hidden bg-white dark:bg-neutral-900 border-b dark:border-neutral-700 px-4 py-3 flex items-center">
|
2025-11-26 14:22:01 +07:00
|
|
|
<button
|
|
|
|
|
onClick={() => setSidebarOpen(true)}
|
2025-11-26 15:25:23 +07:00
|
|
|
className="p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-neutral-800 transition-colors"
|
2025-11-26 14:22:01 +07:00
|
|
|
>
|
2025-11-26 15:25:23 +07:00
|
|
|
<svg className="w-6 h-6 text-gray-600 dark:text-neutral-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
2025-11-26 14:22:01 +07:00
|
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
|
|
|
|
|
</svg>
|
|
|
|
|
</button>
|
2025-11-26 15:25:23 +07:00
|
|
|
<h1 className="ml-3 text-lg font-bold text-gray-900 dark:text-white">Hackathon</h1>
|
2025-11-26 14:22:01 +07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<main className="flex-1 overflow-auto">
|
|
|
|
|
<Outlet />
|
|
|
|
|
</main>
|
|
|
|
|
</div>
|
2025-11-26 10:18:36 +07:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2025-11-26 14:22:01 +07:00
|
|
|
export default UserDetailLayout;
|