mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-23 21:34:24 +00:00
feat: add workspace setting section
This commit is contained in:
17
web/src/pages/Setting.tsx
Normal file
17
web/src/pages/Setting.tsx
Normal 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;
|
Reference in New Issue
Block a user