mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 03:15:06 +03:00
## Problem Knip reports many duplicate exports (both named and default). Besides, we're moving away from default exports and even have an eslint rule to enforce it on new code. ## Solution - Cleanup those exports - Update imports when necessary No functional changes. If it builds, it's fine
27 lines
682 B
TypeScript
27 lines
682 B
TypeScript
import { Admonition } from 'ui-patterns/admonition'
|
|
|
|
interface NoPermissionProps {
|
|
resourceText: string
|
|
isFullPage?: boolean
|
|
}
|
|
|
|
export const NoPermission = ({ resourceText, isFullPage = false }: NoPermissionProps) => {
|
|
const NoPermissionMessage = (
|
|
<Admonition
|
|
type="warning"
|
|
title={`You need additional permissions to ${resourceText}`}
|
|
description="Contact your organization owner or administrator for assistance."
|
|
/>
|
|
)
|
|
|
|
if (isFullPage) {
|
|
return (
|
|
<div className="flex h-full items-center justify-center">
|
|
<div className="max-w-lg">{NoPermissionMessage}</div>
|
|
</div>
|
|
)
|
|
} else {
|
|
return NoPermissionMessage
|
|
}
|
|
}
|