Skip to content

Commit

Permalink
show create organization if they don't have one
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield committed Nov 28, 2024
1 parent ab7d06a commit d92ac62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/layout/ErrorProjectUnavailable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Link } from '@posthog/lemon-ui'
import { useValues } from 'kea'
import { PageHeader } from 'lib/components/PageHeader'
import { useEffect, useState } from 'react'
import { CreateOrganizationModal } from 'scenes/organization/CreateOrganizationModal'
import { urls } from 'scenes/urls'
import { userLogic } from 'scenes/userLogic'

Expand Down Expand Up @@ -42,7 +43,9 @@ export function ErrorProjectUnavailable(): JSX.Element {
return (
<div>
<PageHeader />
{user?.team && !user.organization?.teams.some((team) => team.id === user?.team?.id) ? (
{!user?.organization ? (
<CreateOrganizationModal isVisible inline />
) : user?.team && !user.organization?.teams.some((team) => team.id === user?.team?.id) ? (
<>
<h1>Project access has been removed</h1>
<p>
Expand Down

0 comments on commit d92ac62

Please sign in to comment.