Files
supabase/apps/studio/components/interfaces/Organization/NewProject/NotOrganizationOwnerWarning.tsx
7c678b9db8 Update new project flow to add a warning before redirecting (#36349)
* Update new project flow to add a warning before redirecting

* Simplify the logic for picking an org.

* Small UI tweaks

* Readd the alert about a not found org.

* Link to all orgs if slug is undefined

* Nit

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-06-17 09:55:05 +02:00

37 lines
1.1 KiB
TypeScript

import InformationBox from 'components/ui/InformationBox'
import { AlertCircle } from 'lucide-react'
interface NotOrganizationOwnerWarningProps {
slug?: string
}
// [Joshen] This can just use NoPermission component i think
const NotOrganizationOwnerWarning = ({ slug }: NotOrganizationOwnerWarningProps) => {
return (
<div className="mt-4">
<InformationBox
icon={<AlertCircle size="20" strokeWidth={1.5} />}
defaultVisibility={true}
hideCollapse
title="You do not have permission to create a project"
description={
<div className="space-y-3">
<p className="text-sm leading-normal">
{slug ? (
<>
Contact the owner or administrator to create a new project in the{' '}
<code>{slug}</code> organization.
</>
) : (
<>Contact the owner or administrator to create a new project.</>
)}
</p>
</div>
}
/>
</div>
)
}
export default NotOrganizationOwnerWarning