mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 19:35:06 +03:00
* added initial queue operations and feature flag * updated types * added dirty state tracking on columns * updated queue operations * updated operation types and queue * updated spacing * removed on cancel * updated to support saving * updated to include eye details * updated spacing for orders * updated to support shortcuts * added feature preview * updated to unify queue methods * added key generation * used unique keys rather than random uuid * updated based on code review * operation key * updated handle cancel * updated remove operation button * updated views for toast * updated logic to support optimistic updates * updated types * code cleanup: remove LLM slop * updated PR bug * updated preview for logout * updated based on code review * removed use effect as it was causing problems * fixed toast mounting away from sql editor * removed toast for dedicated action bar * cleaned up logic * updated queue operations * renamed method * updated name for types * updated comment * fixed code rabbit solution * added check for changed column * added tests
30 lines
943 B
TypeScript
30 lines
943 B
TypeScript
import { PermissionAction } from '@supabase/shared-types/out/constants'
|
|
import { PropsWithChildren } from 'react'
|
|
|
|
import { SaveQueueActionBar } from '@/components/grid/components/footer/operations/SaveQueueActionBar'
|
|
import NoPermission from 'components/ui/NoPermission'
|
|
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
|
|
import { ProjectLayoutWithAuth } from '../ProjectLayout'
|
|
|
|
export const TableEditorLayout = ({ children }: PropsWithChildren<{}>) => {
|
|
const { can: canReadTables, isSuccess: isPermissionsLoaded } = useAsyncCheckPermissions(
|
|
PermissionAction.TENANT_SQL_ADMIN_READ,
|
|
'tables'
|
|
)
|
|
|
|
if (isPermissionsLoaded && !canReadTables) {
|
|
return (
|
|
<ProjectLayoutWithAuth isBlocking={false}>
|
|
<NoPermission isFullPage resourceText="view tables from this project" />
|
|
</ProjectLayoutWithAuth>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<>
|
|
{children}
|
|
<SaveQueueActionBar />
|
|
</>
|
|
)
|
|
}
|