mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 13:49:09 +03:00
* 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>
37 lines
1.1 KiB
TypeScript
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
|