Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 470
refactor(ui): wire mosaic organization sections to real Clerk hooks#9017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import type { ReactNode } from 'react'; | ||
| import { Box } from '../components/box'; | ||
| import { Tabs } from '../components/tabs'; | ||
| interface OrganizationProfileViewProps { | ||
| /** The General tab's panel content. */ | ||
| general: ReactNode; | ||
| } | ||
| export function OrganizationProfileView({ general }: OrganizationProfileViewProps) { | ||
| return ( | ||
| <Box | ||
| sx={{ | ||
| width: '100%', | ||
| }} | ||
| > | ||
| <Box | ||
| render={p => <h1 {...p} />} | ||
| sx={t => ({ | ||
| ...t.text('lg'), | ||
| fontWeight: t.font.semibold, | ||
| marginBlockEnd: t.spacing(8), | ||
| })} | ||
| > | ||
| Organization Profile | ||
| </Box> | ||
| <Tabs.Root defaultValue='general'> | ||
| <Tabs.List> | ||
| <Tabs.Tab value='general'>General</Tabs.Tab> | ||
| <Tabs.Tab value='members'>Members</Tabs.Tab> | ||
| </Tabs.List> | ||
| <Tabs.Panel value='general'>{general}</Tabs.Panel> | ||
| <Tabs.Panel value='members'> | ||
| <Box | ||
| render={p => <h1 {...p} />} | ||
| sx={t => ({ | ||
| ...t.text('base'), | ||
| fontWeight: t.font.medium, | ||
| textAlign: 'center', | ||
| })} | ||
| > | ||
| Members content | ||
| </Box> | ||
| </Tabs.Panel> | ||
| </Tabs.Root> | ||
| </Box> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,6 @@ | ||
| import { Box } from '../components/box'; | ||
| import { Tabs } from '../components/tabs'; | ||
| import { OrganizationProfileGeneral } from '../panels/organization-profile-general'; | ||
| import { OrganizationProfileView } from './organization-profile-view'; | ||
| export function OrganizationProfile() { | ||
| return ( | ||
| <Box | ||
| sx={t => ({ | ||
| width: '100%', | ||
| })} | ||
| > | ||
| <Box | ||
| render={p => <h1 {...p} />} | ||
| sx={t => ({ | ||
| ...t.text('lg'), | ||
| fontWeight: t.font.semibold, | ||
| marginBlockEnd: t.spacing(8), | ||
| })} | ||
| > | ||
| Organization Profile | ||
| </Box> | ||
| <Tabs.Root defaultValue='general'> | ||
| <Tabs.List> | ||
| <Tabs.Tab value='general'>General</Tabs.Tab> | ||
| <Tabs.Tab value='members'>Members</Tabs.Tab> | ||
| </Tabs.List> | ||
| <Tabs.Panel value='general'> | ||
| <OrganizationProfileGeneral /> | ||
| </Tabs.Panel> | ||
| <Tabs.Panel value='members'> | ||
| <Box | ||
| render={p => <h1 {...p} />} | ||
| sx={t => ({ | ||
| ...t.text('base'), | ||
| fontWeight: t.font.medium, | ||
| textAlign: 'center', | ||
| })} | ||
| > | ||
| Members content | ||
| </Box> | ||
| </Tabs.Panel> | ||
| </Tabs.Root> | ||
| </Box> | ||
| ); | ||
| return <OrganizationProfileView general={<OrganizationProfileGeneral />} />; | ||
| } |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import type { ReactNode } from 'react'; | ||
| import { Box } from '../components/box'; | ||
| import { alpha } from '../utils'; | ||
| interface OrganizationProfileGeneralViewProps { | ||
| /** The leave-organization section, rendered above the divider. */ | ||
| leaveOrganization: ReactNode; | ||
| /** The delete-organization section, rendered below the divider. */ | ||
| deleteOrganization: ReactNode; | ||
| } | ||
| export function OrganizationProfileGeneralView({ | ||
| leaveOrganization, | ||
| deleteOrganization, | ||
| }: OrganizationProfileGeneralViewProps) { | ||
| return ( | ||
| <Box | ||
| sx={{ | ||
| width: '100%', | ||
| containerType: 'inline-size', | ||
| }} | ||
| > | ||
| {leaveOrganization} | ||
| <Box | ||
| sx={t => ({ | ||
| height: '1px', | ||
| background: `light-dark(${alpha('#000', 10)},${alpha('#fff', 10)})`, | ||
| marginBlock: t.spacing(4), | ||
| })} | ||
| /> | ||
| {deleteOrganization} | ||
| </Box> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,12 @@ | ||
| import { Box } from '../components/box'; | ||
| import { DeleteOrganization } from '../sections/delete-organization'; | ||
| import { LeaveOrganization } from '../sections/leave-organization'; | ||
| import { alpha } from '../utils'; | ||
| import { OrganizationProfileGeneralView } from './organization-profile-general-view'; | ||
| export function OrganizationProfileGeneral() { | ||
| return ( | ||
| <Box | ||
| sx={t => ({ | ||
| width: '100%', | ||
| containerType: 'inline-size', | ||
| })} | ||
| > | ||
| <LeaveOrganization /> | ||
| <Box | ||
| sx={t => ({ | ||
| height: '1px', | ||
| background: `light-dark(${alpha('#000', 10)},${alpha('#fff', 10)})`, | ||
| marginBlock: t.spacing(4), | ||
| })} | ||
| /> | ||
| <DeleteOrganization /> | ||
| </Box> | ||
| <OrganizationProfileGeneralView | ||
| leaveOrganization={<LeaveOrganization />} | ||
| deleteOrganization={<DeleteOrganization />} | ||
| /> | ||
| ); | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.