2
0

feat(dashboard): ️ Delete workspace button

This commit is contained in:
Baptiste Arnaud
2022-05-17 08:59:02 -07:00
parent d0119ee24b
commit b7b034432a
6 changed files with 114 additions and 7 deletions

View File

@ -132,21 +132,27 @@ export const WorkspaceSettingsModal = ({
</Stack>
</Stack>
<Flex flex="1" p="10">
<SettingsContent tab={selectedTab} />
<SettingsContent tab={selectedTab} onClose={onClose} />
</Flex>
</ModalContent>
</Modal>
)
}
const SettingsContent = ({ tab }: { tab: SettingsTab }) => {
const SettingsContent = ({
tab,
onClose,
}: {
tab: SettingsTab
onClose: () => void
}) => {
switch (tab) {
case 'my-account':
return <MyAccountForm />
case 'user-settings':
return <EditorSettings />
case 'workspace-settings':
return <WorkspaceSettingsForm />
return <WorkspaceSettingsForm onClose={onClose} />
case 'members':
return <MembersList />
case 'billing':