feat(ui): new Layout UI using antd

This commit is contained in:
Fu Diwei
2024-12-07 13:47:02 +08:00
parent 2facb160aa
commit d6ddf8e9f4
18 changed files with 229 additions and 204 deletions

View 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;