mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-07 21:19:51 +00:00
22 lines
448 B
TypeScript
22 lines
448 B
TypeScript
import { Navigate, Outlet } from "react-router-dom";
|
|
|
|
import Version from "@/components/Version";
|
|
import { getAuthStore } from "@/repository/admin";
|
|
|
|
const AuthLayout = () => {
|
|
const auth = getAuthStore();
|
|
if (auth.isValid && auth.isSuperuser) {
|
|
return <Navigate to="/" />;
|
|
}
|
|
|
|
return (
|
|
<div className="container">
|
|
<Outlet />
|
|
|
|
<Version className="fixed bottom-4 right-8" />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default AuthLayout;
|