Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix reports layout imports

Alaister Youngf38425a966c0
diff --git a/studio/components/layouts/ProjectLayout/ProjectLayout.tsx b/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
index bc86ead7c13..3def6eaba71 100644
--- a/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
+++ b/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
@@ -70,7 +70,7 @@ const ProjectLayout = ({
export const ProjectLayoutWithAuth = withAuth(observer(ProjectLayout))
-export default ProjectLayout
+export default observer(ProjectLayout)
interface MenuBarWrapperProps {
isLoading: boolean
diff --git a/studio/components/layouts/ReportsLayout/ReportsLayout.tsx b/studio/components/layouts/ReportsLayout/ReportsLayout.tsx
index 6baddb56a35..59facd25d12 100644
--- a/studio/components/layouts/ReportsLayout/ReportsLayout.tsx
+++ b/studio/components/layouts/ReportsLayout/ReportsLayout.tsx
@@ -2,7 +2,7 @@ import { PropsWithChildren } from 'react'
import { observer } from 'mobx-react-lite'
import { useRouter } from 'next/router'
import { useStore, withAuth } from 'hooks'
-import BaseLayout from '..'
+import ProjectLayout from '../ProjectLayout/ProjectLayout'
import ProductMenu from 'components/ui/ProductMenu'
import { generateReportsMenu } from './ReportsMenu.utils'
@@ -18,7 +18,7 @@ const ReportsLayout = ({ title, children }: PropsWithChildren<ReportsLayoutProps
const page = router.pathname.split('/')[4] || ''
return (
- <BaseLayout
+ <ProjectLayout
title={title}
product="Reports"
productMenu={<ProductMenu page={page} menu={generateReportsMenu(project)} />}
@@ -26,7 +26,7 @@ const ReportsLayout = ({ title, children }: PropsWithChildren<ReportsLayoutProps
<main style={{ maxHeight: '100vh' }} className="flex-1 overflow-y-auto">
{children}
</main>
- </BaseLayout>
+ </ProjectLayout>
)
}
diff --git a/studio/pages/project/[ref]/reports/[id].tsx b/studio/pages/project/[ref]/reports/[id].tsx
index 8687314216c..01101070ba6 100644
--- a/studio/pages/project/[ref]/reports/[id].tsx
+++ b/studio/pages/project/[ref]/reports/[id].tsx
@@ -1,9 +1,8 @@
+import Reports from 'components/interfaces/Reports/Reports'
+import { ReportsLayout } from 'components/layouts'
+import EditReportModal from 'components/to-be-cleaned/Reports/EditReportModal'
import { observer } from 'mobx-react-lite'
import { NextPageWithLayout } from 'types'
-import { ProjectLayoutWithAuth } from 'components/layouts'
-import EditReportModal from 'components/to-be-cleaned/Reports/EditReportModal'
-import Reports from 'components/interfaces/Reports/Reports'
-import ReportsLayout from 'components/layouts/ReportsLayout/ReportsLayout'
const PageLayout: NextPageWithLayout = () => (
<>
diff --git a/studio/pages/project/[ref]/reports/api.tsx b/studio/pages/project/[ref]/reports/api.tsx
index 48707940d5c..31f799665c7 100644
--- a/studio/pages/project/[ref]/reports/api.tsx
+++ b/studio/pages/project/[ref]/reports/api.tsx
@@ -3,7 +3,7 @@ import { useRouter } from 'next/router'
import { NextPageWithLayout } from 'types'
import { Presets } from 'components/interfaces/Reports/Reports.types'
-import ReportsLayout from 'components/layouts'
+import { ReportsLayout } from 'components/layouts'
import { PRESET_CONFIG } from 'components/interfaces/Reports/Reports.constants'
import ReportWidget from 'components/interfaces/Reports/ReportWidget'
import { hooksFactory, usePresetReport } from 'components/interfaces/Reports/Reports.utils'
diff --git a/studio/pages/project/[ref]/reports/auth.tsx b/studio/pages/project/[ref]/reports/auth.tsx
index 6a164a3e9f5..6e0419aedb6 100644
--- a/studio/pages/project/[ref]/reports/auth.tsx
+++ b/studio/pages/project/[ref]/reports/auth.tsx
@@ -3,7 +3,7 @@ import { useRouter } from 'next/router'
import { NextPageWithLayout } from 'types'
import { Presets } from 'components/interfaces/Reports/Reports.types'
-import ReportsLayout from 'components/layouts'
+import { ReportsLayout } from 'components/layouts'
import { hooksFactory, usePresetReport } from 'components/interfaces/Reports/Reports.utils'
import { PRESET_CONFIG } from 'components/interfaces/Reports/Reports.constants'
import ReportWidget from 'components/interfaces/Reports/ReportWidget'
diff --git a/studio/pages/project/[ref]/reports/database.tsx b/studio/pages/project/[ref]/reports/database.tsx
index aafe7575d28..253fcc54f6d 100644
--- a/studio/pages/project/[ref]/reports/database.tsx
+++ b/studio/pages/project/[ref]/reports/database.tsx
@@ -8,7 +8,7 @@ import { TIME_PERIODS_INFRA, USAGE_APPROACHING_THRESHOLD } from 'lib/constants'
import { formatBytes } from 'lib/helpers'
import { NextPageWithLayout } from 'types'
-import ReportsLayout from 'components/layouts/ReportsLayout/ReportsLayout'
+import { ReportsLayout } from 'components/layouts'
import ChartHandler from 'components/to-be-cleaned/Charts/ChartHandler'
import DateRangePicker from 'components/to-be-cleaned/DateRangePicker'
import Panel from 'components/ui/Panel'
diff --git a/studio/pages/project/[ref]/reports/index.tsx b/studio/pages/project/[ref]/reports/index.tsx
index ac2f6334460..f4ae714fbba 100644
--- a/studio/pages/project/[ref]/reports/index.tsx
+++ b/studio/pages/project/[ref]/reports/index.tsx
@@ -11,7 +11,7 @@ import { useProjectContentStore } from 'stores/projectContentStore'
import Loading from 'components/ui/Loading'
import ProductEmptyState from 'components/to-be-cleaned/ProductEmptyState'
import { createReport } from 'components/to-be-cleaned/Reports/Reports.utils'
-import ReportsLayout from 'components/layouts/ReportsLayout/ReportsLayout'
+import { ReportsLayout } from 'components/layouts'
export const UserReportPage: NextPageWithLayout = () => {
const [loading, setLoading] = useState(true)