diff --git a/nest-front/src/App.tsx b/nest-front/src/App.tsx index 46ddd48..8af3f33 100644 --- a/nest-front/src/App.tsx +++ b/nest-front/src/App.tsx @@ -3,7 +3,6 @@ import { Routes, Route } from 'react-router-dom'; import { AuthProvider } from './contexts/AuthContext'; import { ProtectedRoute } from './components/shared/ProtectedRoute'; import { PublicLayout } from './components/layout/PublicLayout'; -import { IntranetLayout } from './components/layout/IntranetLayout'; import { PageLoader } from './components/shared/PageLoader'; // ── Public Pages (lazy-loaded) ──────────────────────────────────────────────── @@ -20,15 +19,6 @@ const LoginPage = lazy(() => import('./pages/public/LoginPage')); const RegisterPage = lazy(() => import('./pages/public/RegisterPage')); const NotFoundPage = lazy(() => import('./pages/public/NotFoundPage')); -// ── Intranet Pages (lazy-loaded) ────────────────────────────────────────────── - -const IntranetDashboard = lazy(() => import('./pages/intranet/IntranetDashboard')); -const IntranetBugs = lazy(() => import('./pages/intranet/IntranetBugs')); -const IntranetFeed = lazy(() => import('./pages/intranet/IntranetFeed')); -const IntranetEvents = lazy(() => import('./pages/intranet/IntranetEvents')); -const IntranetUsers = lazy(() => import('./pages/intranet/IntranetUsers')); -const IntranetModeration = lazy(() => import('./pages/intranet/IntranetModeration')); - // ── App ──────────────────────────────────────────────────────────────────────── export default function App() { @@ -57,23 +47,6 @@ export default function App() { } /> } /> - - {/* Intranet Routes — staff only */} - - - - } - > - } /> - } /> - } /> - } /> - } /> - } /> - diff --git a/nest-front/src/components/layout/IntranetLayout.tsx b/nest-front/src/components/layout/IntranetLayout.tsx deleted file mode 100644 index 52bf4a0..0000000 --- a/nest-front/src/components/layout/IntranetLayout.tsx +++ /dev/null @@ -1,150 +0,0 @@ -import { NavLink, Outlet, useNavigate } from 'react-router-dom'; -import { useAuth } from '../../contexts/AuthContext'; -import { useCallback } from 'react'; - -const INTRANET_LINKS = [ - { to: '/intranet', label: 'Dashboard', icon: '[>]', end: true }, - { to: '/intranet/bugs', label: 'Bug Reports', icon: '[!]', end: false }, - { to: '/intranet/feed', label: 'Team Feed', icon: '[~]', end: false }, - { to: '/intranet/events', label: 'Events', icon: '[E]', end: false }, - { to: '/intranet/users', label: 'Users', icon: '[U]', end: false }, - { to: '/intranet/moderation', label: 'Moderation', icon: '[M]', end: false }, -]; - -export function IntranetLayout() { - const { user, logout } = useAuth(); - const navigate = useNavigate(); - - const handleLogout = useCallback(() => { - logout(); - navigate('/'); - }, [logout, navigate]); - - return ( -
- {/* Sidebar */} - - - {/* Main content */} -
- -
-
- ); -} diff --git a/nest-front/src/components/shared/Navbar.tsx b/nest-front/src/components/shared/Navbar.tsx index aa1b3d8..4d418d5 100644 --- a/nest-front/src/components/shared/Navbar.tsx +++ b/nest-front/src/components/shared/Navbar.tsx @@ -11,7 +11,7 @@ const NAV_LINKS = [ ]; export function Navbar() { - const { user, isAuthenticated, isStaff, logout } = useAuth(); + const { user, isAuthenticated, logout } = useAuth(); const navigate = useNavigate(); const [menuOpen, setMenuOpen] = useState(false); @@ -90,42 +90,6 @@ export function Navbar() { {label} ))} - - {/* Intranet — visually separated, highlighted button */} - {isStaff && ( - <> - {/* Vertical divider */} -