feat(ui): new Layout UI using antd
This commit is contained in:
21
ui/src/pages/AuthLayout.tsx
Normal file
21
ui/src/pages/AuthLayout.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Navigate, Outlet } from "react-router-dom";
|
||||
|
||||
import Version from "@/components/certimate/Version";
|
||||
import { getPocketBase } from "@/repository/pocketbase";
|
||||
|
||||
const AuthLayout = () => {
|
||||
const auth = getPocketBase().authStore;
|
||||
if (auth.isValid && auth.isAdmin) {
|
||||
return <Navigate to="/" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="container">
|
||||
<Outlet />
|
||||
|
||||
<Version className="fixed right-8 bottom-4" />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default AuthLayout;
|
||||
Reference in New Issue
Block a user