Updated login page, added ProtectedRoute object for wrapping in layouts, added ProtectedRoute authorization verification to Admin route root
This commit is contained in:
parent
f055e77eea
commit
efa42a53b2
5 changed files with 65 additions and 17 deletions
|
|
@ -1,11 +1,13 @@
|
|||
import React from "react";
|
||||
|
||||
export default function AdminLayout({children}: {children: React.ReactNode}) {
|
||||
import ProtectedRoute from "@/components/wrappers/ProtectedRoute";
|
||||
|
||||
export default async function AdminLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
// TODO: Put user state management here
|
||||
//redirect("wherever state says") <= stateRouteManager()
|
||||
return (
|
||||
<div>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return <ProtectedRoute>{children}</ProtectedRoute>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue