mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 20:35:07 +03:00
## Context Related prior work was making edge functions page accessible while project is restoring - however the status of the project gets flipped to COMING_UP while it's restoring hence why the functions page was still inaccessible. ## Changes involved - Update `NavigationBar.utils` to have edge functions link to `/functions` irregardless of project status - (Unrelated) Disable (with tooltip) deploy new function CTA on edge functions page if project is not active <img width="403" height="108" alt="image" src="https://github.com/user-attachments/assets/88479247-999b-4d41-a444-6705f8c3993e" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Deploy Edge Function button now disables and shows a tooltip when the project is inactive to make deployment status clear. * **Bug Fixes** * Edge Functions link now points consistently to the functions view regardless of project build state. * **Refactor** * Consolidated project-active check and reorganized related UI wiring to standardize inactive-state handling across settings and controls. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
30 lines
1.3 KiB
TypeScript
30 lines
1.3 KiB
TypeScript
import { PropsWithChildren } from 'react'
|
|
import { DatabaseSelectorStateContextProvider } from 'state/database-selector'
|
|
import { RoleImpersonationStateContextProvider } from 'state/role-impersonation-state'
|
|
import { StorageExplorerStateContextProvider } from 'state/storage-explorer'
|
|
import { TableEditorStateContextProvider } from 'state/table-editor'
|
|
import { TabsStateContextProvider } from 'state/tabs'
|
|
|
|
type ProjectContextProviderProps = {
|
|
projectRef: string | undefined
|
|
}
|
|
|
|
export const ProjectContextProvider = ({
|
|
projectRef,
|
|
children,
|
|
}: PropsWithChildren<ProjectContextProviderProps>) => {
|
|
return (
|
|
<TableEditorStateContextProvider key={`table-editor-state-${projectRef}`}>
|
|
<TabsStateContextProvider key={`tabs-state-${projectRef}`}>
|
|
<StorageExplorerStateContextProvider key={`storage-explorer-state-${projectRef}`}>
|
|
<DatabaseSelectorStateContextProvider key={`database-selector-state-${projectRef}`}>
|
|
<RoleImpersonationStateContextProvider key={`role-impersonation-state-${projectRef}`}>
|
|
{children}
|
|
</RoleImpersonationStateContextProvider>
|
|
</DatabaseSelectorStateContextProvider>
|
|
</StorageExplorerStateContextProvider>
|
|
</TabsStateContextProvider>
|
|
</TableEditorStateContextProvider>
|
|
)
|
|
}
|