fix(hackathon): replace top navbar with sidebar on team and user detail pages
- Update teams/[teamId]/layout.tsx to use Sidebar component - Update users/[userId]/layout.tsx to use Sidebar component - Now matches dashboard layout with sidebar navigation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
63db7ff6ad
commit
33365affa2
@@ -1,18 +1,34 @@
|
|||||||
import { FC, ReactNode } from 'react';
|
import { FC, ReactElement, useState } from 'react';
|
||||||
import { Outlet } from 'react-router';
|
import { Outlet } from 'react-router';
|
||||||
import { Navigation } from '../../../components/navigation';
|
import { Sidebar } from '../../../components/sidebar';
|
||||||
|
|
||||||
interface TeamLayoutProps {
|
const TeamDetailLayout: FC = (): ReactElement => {
|
||||||
children?: ReactNode;
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
||||||
}
|
|
||||||
|
|
||||||
export const TeamLayout: FC<TeamLayoutProps> = () => {
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50">
|
<div className="flex min-h-screen bg-gray-50">
|
||||||
<Navigation />
|
<Sidebar isOpen={sidebarOpen} onClose={() => setSidebarOpen(false)} />
|
||||||
<Outlet />
|
|
||||||
|
<div className="flex-1 flex flex-col overflow-auto">
|
||||||
|
{/* Mobile Header with Hamburger */}
|
||||||
|
<div className="lg:hidden bg-white border-b px-4 py-3 flex items-center">
|
||||||
|
<button
|
||||||
|
onClick={() => setSidebarOpen(true)}
|
||||||
|
className="p-2 rounded-lg hover:bg-gray-100 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<h1 className="ml-3 text-lg font-bold text-gray-900">🏆 Hackathon</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<main className="flex-1 overflow-auto">
|
||||||
|
<Outlet />
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default TeamLayout;
|
export default TeamDetailLayout;
|
||||||
|
|||||||
@@ -1,18 +1,34 @@
|
|||||||
import { FC, ReactNode } from 'react';
|
import { FC, ReactElement, useState } from 'react';
|
||||||
import { Outlet } from 'react-router';
|
import { Outlet } from 'react-router';
|
||||||
import { Navigation } from '../../../components/navigation';
|
import { Sidebar } from '../../../components/sidebar';
|
||||||
|
|
||||||
interface UserLayoutProps {
|
const UserDetailLayout: FC = (): ReactElement => {
|
||||||
children?: ReactNode;
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
||||||
}
|
|
||||||
|
|
||||||
export const UserLayout: FC<UserLayoutProps> = () => {
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50">
|
<div className="flex min-h-screen bg-gray-50">
|
||||||
<Navigation />
|
<Sidebar isOpen={sidebarOpen} onClose={() => setSidebarOpen(false)} />
|
||||||
<Outlet />
|
|
||||||
|
<div className="flex-1 flex flex-col overflow-auto">
|
||||||
|
{/* Mobile Header with Hamburger */}
|
||||||
|
<div className="lg:hidden bg-white border-b px-4 py-3 flex items-center">
|
||||||
|
<button
|
||||||
|
onClick={() => setSidebarOpen(true)}
|
||||||
|
className="p-2 rounded-lg hover:bg-gray-100 transition-colors"
|
||||||
|
>
|
||||||
|
<svg className="w-6 h-6 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<h1 className="ml-3 text-lg font-bold text-gray-900">🏆 Hackathon</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<main className="flex-1 overflow-auto">
|
||||||
|
<Outlet />
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default UserLayout;
|
export default UserDetailLayout;
|
||||||
|
|||||||
Reference in New Issue
Block a user