Skip to content

Commit 481648e

Browse files
committed
fix: update session tasks flow to have single root
1 parent 3bbde52 commit 481648e

File tree

2 files changed

+25
-26
lines changed
  • packages/clerk-js/src/ui

2 files changed

+25
-26
lines changed

packages/clerk-js/src/ui/components/SessionTasks/tasks/TaskChooseOrganization/index.tsx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ const TaskChooseOrganizationInternal = () => {
3434

3535
return (
3636
<Flow.Root flow='taskChooseOrganization'>
37-
<Card.Root>
38-
<Flow.Part part={hasExistingResources ? 'chooseOrganization' : 'createOrganization'}>
37+
<Flow.Part part={hasExistingResources ? 'chooseOrganization' : 'createOrganization'}>
38+
<Card.Root>
3939
<Card.Content sx={t => ({ padding: `${t.space.$8} ${t.space.$none} ${t.space.$none}`, gap: t.space.$7 })}>
4040
{isLoading ? (
4141
<Flex
@@ -57,31 +57,31 @@ const TaskChooseOrganizationInternal = () => {
5757
<TaskChooseOrganizationFlows initialFlow={hasExistingResources ? 'choose' : 'create'} />
5858
)}
5959
</Card.Content>
60-
</Flow.Part>
6160

62-
<Card.Footer>
63-
<Card.Action
64-
elementId='signOut'
65-
gap={2}
66-
justify='center'
67-
sx={() => ({ width: '100%' })}
68-
>
69-
{identifier && (
70-
<Card.ActionText
71-
truncate
72-
localizationKey={localizationKeys('taskChooseOrganization.signOut.actionText', {
73-
identifier,
74-
})}
61+
<Card.Footer>
62+
<Card.Action
63+
elementId='signOut'
64+
gap={2}
65+
justify='center'
66+
sx={() => ({ width: '100%' })}
67+
>
68+
{identifier && (
69+
<Card.ActionText
70+
truncate
71+
localizationKey={localizationKeys('taskChooseOrganization.signOut.actionText', {
72+
identifier,
73+
})}
74+
/>
75+
)}
76+
<Card.ActionLink
77+
sx={() => ({ flexShrink: 0 })}
78+
onClick={handleSignOut}
79+
localizationKey={localizationKeys('taskChooseOrganization.signOut.actionLink')}
7580
/>
76-
)}
77-
<Card.ActionLink
78-
sx={() => ({ flexShrink: 0 })}
79-
onClick={handleSignOut}
80-
localizationKey={localizationKeys('taskChooseOrganization.signOut.actionLink')}
81-
/>
82-
</Card.Action>
83-
</Card.Footer>
84-
</Card.Root>
81+
</Card.Action>
82+
</Card.Footer>
83+
</Card.Root>
84+
</Flow.Part>
8585
</Flow.Root>
8686
);
8787
};

packages/clerk-js/src/ui/elements/contexts/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export type FlowMetadata = {
100100
| 'apiKeys'
101101
| 'oauthConsent'
102102
| 'subscriptionDetails'
103-
| 'subscriptionDetails'
104103
| 'tasks'
105104
| 'taskChooseOrganization';
106105
part?:

0 commit comments

Comments
 (0)