feat: add workspace setting section

This commit is contained in:
Steven
2023-06-23 22:46:35 +08:00
parent 61568840d3
commit afbf935a71
8 changed files with 101 additions and 6 deletions

17
web/src/pages/Setting.tsx Normal file
View File

@@ -0,0 +1,17 @@
import { useAppSelector } from "../stores";
import AccountSection from "../components/setting/AccountSection";
import WorkspaceSection from "../components/setting/WorkspaceSection";
const Setting: React.FC = () => {
const user = useAppSelector((state) => state.user).user as User;
const isAdmin = user.role === "ADMIN";
return (
<div className="mx-auto max-w-4xl w-full px-3 py-6 flex flex-col justify-start items-start space-y-4">
<AccountSection />
{isAdmin && <WorkspaceSection />}
</div>
);
};
export default Setting;