mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 18:35:07 +03:00
* feat: bucket type page and corresponding sidebar * feat: handle /storage URL redirection based on feature flag * fix: default sidebar selection * Use feature flag for feature preview, and have new UI behind feature preview instead * Remove hardcode * Minor clean ups * chore: improve feature preview description * chore: more descriptive name for general file storage type * fix: preview image * Minor nits --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
30 lines
896 B
TypeScript
30 lines
896 B
TypeScript
import { ReactNode } from 'react'
|
|
|
|
import { useIsNewStorageUIEnabled } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
|
|
import { StorageMenu } from 'components/interfaces/Storage/StorageMenu'
|
|
import { StorageMenuV2 } from 'components/interfaces/Storage/StorageMenuV2'
|
|
import { withAuth } from 'hooks/misc/withAuth'
|
|
import ProjectLayout from '../ProjectLayout/ProjectLayout'
|
|
|
|
export interface StorageLayoutProps {
|
|
title: string
|
|
children: ReactNode
|
|
}
|
|
|
|
const StorageLayout = ({ title, children }: StorageLayoutProps) => {
|
|
const isStorageV2 = useIsNewStorageUIEnabled()
|
|
|
|
return (
|
|
<ProjectLayout
|
|
stickySidebarBottom={isStorageV2 ? false : true}
|
|
title={title || 'Storage'}
|
|
product="Storage"
|
|
productMenu={isStorageV2 ? <StorageMenuV2 /> : <StorageMenu />}
|
|
>
|
|
{children}
|
|
</ProjectLayout>
|
|
)
|
|
}
|
|
|
|
export default withAuth(StorageLayout)
|