mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 23:59:08 +03:00
* Move all studio files from /studio to /apps/studio. * Move studio specific prettier ignores. * Fix the ui references from studio. * Fix the css imports. * Fix all package.json issues. * Fix the prettier setup for the studio app. * Add .turbo folder to prettierignore. * Fix the github workflows.
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { IconAlertCircle } from 'ui'
|
|
|
|
interface NoPermissionProps {
|
|
resourceText: string
|
|
isFullPage?: boolean
|
|
}
|
|
|
|
const NoPermission = ({ resourceText, isFullPage = false }: NoPermissionProps) => {
|
|
const NoPermissionMessage = () => (
|
|
<div
|
|
className={[
|
|
'block w-full rounded border border-opacity-20 py-4 px-6',
|
|
'border-overlay bg-surface-200',
|
|
].join(' ')}
|
|
>
|
|
<div className="flex space-x-3">
|
|
<div className="mt-1">
|
|
<IconAlertCircle size="large" />
|
|
</div>
|
|
<div className="flex w-full items-center justify-between">
|
|
<div className="space-y-1">
|
|
<p className="text-sm">You need additional permissions to {resourceText}</p>
|
|
<div>
|
|
<p className="text-sm text-foreground-light">
|
|
Contact your organization owner or adminstrator for assistance.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
|
|
if (isFullPage) {
|
|
return (
|
|
<div className="flex h-full items-center justify-center">
|
|
<div className="w-[550px]">
|
|
<NoPermissionMessage />
|
|
</div>
|
|
</div>
|
|
)
|
|
} else {
|
|
return <NoPermissionMessage />
|
|
}
|
|
}
|
|
|
|
export default NoPermission
|