Skip to content

Commit d37729b

Browse files
committed
fe: Add logout button to onboarding
If the user does not have an existing org
1 parent 75056bd commit d37729b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

clients/apps/web/src/components/Onboarding/OrganizationStep.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useAuth } from '@/hooks'
55
import { usePostHog } from '@/hooks/posthog'
66
import { useCreateOrganization } from '@/hooks/queries'
77
import { setValidationErrors } from '@/utils/api/errors'
8+
import { CONFIG } from '@/utils/config'
89
import { FormControl } from '@mui/material'
910
import { schemas } from '@polar-sh/client'
1011
import Button from '@polar-sh/ui/components/atoms/Button'
@@ -351,6 +352,17 @@ export const OrganizationStep = ({
351352
</Button>
352353
</Link>
353354
)}
355+
{!hasExistingOrg && (
356+
<Button
357+
variant="secondary"
358+
fullWidth
359+
onClick={() =>
360+
router.push(`${CONFIG.BASE_URL}/v1/auth/logout`)
361+
}
362+
>
363+
Logout
364+
</Button>
365+
)}
354366
</FadeUp>
355367
</form>
356368
</Form>

0 commit comments

Comments
 (0)