Skip to content

Commit 3e43dd3

Browse files
committed
Revert "protect admin, judge, and participant routes (#179)"
This reverts commit dd6a75f.
1 parent 3405b86 commit 3e43dd3

File tree

5 files changed

+15
-24
lines changed

5 files changed

+15
-24
lines changed

src/app/admin/layout.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import type { Metadata } from "next";
22

33
import SideNavBar from "@/components/Dashboard/SideNavBar";
44
import TopNavBar from "@/components/Dashboard/TopNavBar";
5-
import { UserType } from "@/components/contexts/UserContext";
6-
import withAuthGuard from "@/components/hoc/withAuthGuard";
75

86
export const metadata: Metadata = {
97
title: "Hack the Change - Admin",
@@ -32,4 +30,4 @@ function AdminLayout({ children }: { children: React.ReactNode }) {
3230
);
3331
}
3432

35-
export default withAuthGuard(AdminLayout, [UserType.Admin]);
33+
export default AdminLayout;

src/app/judging/layout.tsx

-8
This file was deleted.

src/app/participant/layout.tsx

-11
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import UserFoodTicket from "@/components/UserProfile/FoodTicket";
22

33
export default function FoodTicket() {
4-
return <UserFoodTicket />;
4+
return (
5+
<>
6+
<UserFoodTicket />
7+
</>
8+
);
59
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import TeamProfile from "@/components/UserProfile/TeamProfile";
2+
import { UserType } from "@/components/contexts/UserContext";
3+
import withAuthGuard from "@/components/hoc/withAuthGuard";
24

3-
export default function TeamDetails() {
5+
function TeamDetails() {
46
return <TeamProfile />;
57
}
8+
9+
export default withAuthGuard(TeamDetails, [
10+
UserType.Participant,
11+
UserType.Admin,
12+
UserType.Judge,
13+
]);

0 commit comments

Comments
 (0)