(ActiveTab.general);
const handleTabChange = (tab: ActiveTab) => {
setActiveTab(tab);
};
const handleClickClose = () => {
onClose && onClose();
};
const isPrivate = workspace?.type === WorkspaceType.Private;
useEffect(() => {
// reset tab when modal is closed
if (!isShow) {
setActiveTab(ActiveTab.general);
}
}, [isShow]);
return (
Workspace Settings
{activeTab === ActiveTab.general && (
)}
{activeTab === ActiveTab.members && workspace && (
)}
{activeTab === ActiveTab.publish && }
);
};
const GeneralPage = ({ workspace }: { workspace?: Workspace }) => {
return (
Workspace Avatar
W
{/* upload
*/}
Workspace Name
Workspace Owner
);
};
const MembersPage = ({ workspace }: { workspace: Workspace }) => {
const [isInviteModalShow, setIsInviteModalShow] = useState(false);
return (
Users(88)
Access level
S
Svaney
svaneyshen@gmail.com
Workspace Owner
{
setIsInviteModalShow(false);
}}
workspaceId={workspace.id}
open={isInviteModalShow}
>
);
};
const PublishPage = () => {
return (
After publishing to the web, everyone can view the content of this
workspace through the link.
Share with link
);
};