Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function Navbar() {
if (p === "/" || p === "") return "home";
if (p.startsWith("/about")) return "about";
if (p.startsWith("/events")) return "events";
if (p.startsWith("/gallery")) return "gallery";
if (p.startsWith("/apply")) return "apply";
return "home";
}, [pathname]);
Expand All @@ -21,6 +22,7 @@ export default function Navbar() {
{ id: "home", label: "HOME", href: "/" },
{ id: "about", label: "ABOUT", href: "/about" },
{ id: "events", label: "EVENTS", href: "/events" },
{ id: "gallery", label: "GALLERY", href: "/gallery" },
{ id: "apply", label: "APPLY", href: "/apply" },
];

Expand Down
4 changes: 4 additions & 0 deletions components/admin/AdminLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default function AdminLayout({
}) {
const pathname = usePathname();

if (pathname === "/admin/login") {
return <>{children}</>;
}

return (
<div className="min-h-screen flex">
<aside className="w-64 border-r p-4">
Expand Down
6 changes: 1 addition & 5 deletions components/layout/PublicLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react";
import Navbar from "@/components/Navbar";
import AuthButton from "@/components/auth/AuthButton";
import Footer from "@/components/Footer";

export default function PublicLayout({
Expand All @@ -12,14 +11,11 @@ export default function PublicLayout({
<>
<header>
<Navbar />
<div className="flex items-center gap-4 px-4">
<AuthButton />
</div>
</header>

<main>{children}</main>

<Footer />
</>
);
}
}