Skip to content

Commit

Permalink
typo role ADMIN into Admin
Browse files Browse the repository at this point in the history
  • Loading branch information
antonisdev committed Dec 12, 2024
1 parent 79ad020 commit 0961590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/AdminRouteProtection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { UserContext } from "./Layout";
function AdminRouteProtection({ children }: { children: React.ReactNode }) {
const userInfo = useContext(UserContext);

if (!userInfo.isLoggedIn || userInfo.role !== "ADMIN") {
if (!userInfo.isLoggedIn || userInfo.role !== "Admin") {
return <Navigate to="/" replace />;
}

Expand Down

0 comments on commit 0961590

Please sign in to comment.