mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 05:09:12 +03:00
* feat: rename reports to observability on nav sidebar * fix: observability route * feat: observability navigation and redirects * fix: first time load redirects * feat: change auth overview reports link * feat: clean up of other links to observability sections * fix: query perf redirects * chore: find exhaustive deps and disable for time being * fix: charis suggested fixes * fix: forgotten suggested fix * chore: delete old reports views files * fix: paths in reports tests * fix: url sync useEffect should trigger only once * feat: reorganise observability sidebar * fix: data api not being selected * fix: wrong layout for realitime * fix: custom reports reloading --------- Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com> Co-authored-by: Ali Waseem <waseema393@gmail.com>
35 lines
970 B
TypeScript
35 lines
970 B
TypeScript
import { PropsWithChildren } from 'react'
|
|
|
|
import { useParams } from 'common'
|
|
import { UnknownInterface } from 'components/ui/UnknownInterface'
|
|
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
|
|
import { withAuth } from 'hooks/misc/withAuth'
|
|
import { ProjectLayout } from '../ProjectLayout'
|
|
import ObservabilityMenu from './ObservabilityMenu'
|
|
|
|
interface ObservabilityLayoutProps {
|
|
title?: string
|
|
}
|
|
|
|
const ObservabilityLayout = ({ title, children }: PropsWithChildren<ObservabilityLayoutProps>) => {
|
|
const { ref } = useParams()
|
|
const { reportsAll } = useIsFeatureEnabled(['reports:all'])
|
|
|
|
if (reportsAll) {
|
|
return (
|
|
<ProjectLayout
|
|
title={title}
|
|
product="Observability"
|
|
productMenu={<ObservabilityMenu />}
|
|
isBlocking={false}
|
|
>
|
|
{children}
|
|
</ProjectLayout>
|
|
)
|
|
} else {
|
|
return <UnknownInterface urlBack={`/project/${ref}`} />
|
|
}
|
|
}
|
|
|
|
export default withAuth(ObservabilityLayout)
|