certimate/ui/src/pages/AuthLayout.tsx
2025-01-18 07:09:41 +08:00

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;