Skip to content

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

Fix test

Joshen Lim973b61c9cb4c
diff --git a/studio/components/layouts/ReportsLayout/ReportsLayout.tsx b/studio/components/layouts/ReportsLayout/ReportsLayout.tsx
index 3de10ebade9..6baddb56a35 100644
--- a/studio/components/layouts/ReportsLayout/ReportsLayout.tsx
+++ b/studio/components/layouts/ReportsLayout/ReportsLayout.tsx
@@ -12,9 +12,9 @@ interface ReportsLayoutProps {
const ReportsLayout = ({ title, children }: PropsWithChildren<ReportsLayoutProps>) => {
const { ui } = useStore()
- const project = ui.selectedProject
-
const router = useRouter()
+
+ const project = ui.selectedProject
const page = router.pathname.split('/')[4] || ''
return (
diff --git a/studio/components/layouts/index.ts b/studio/components/layouts/index.ts
index d0a687bffbf..381b5394fb5 100644
--- a/studio/components/layouts/index.ts
+++ b/studio/components/layouts/index.ts
@@ -15,6 +15,7 @@ import { WizardLayoutWithoutAuth } from './WizardLayout'
import VercelIntegrationLayout from './VercelIntegrationLayout'
import BillingLayout from './BillingLayout'
import LogsLayout from './LogsLayout/LogsLayout'
+import ReportsLayout from './ReportsLayout/ReportsLayout'
export {
ProjectLayoutWithAuth,
@@ -34,6 +35,7 @@ export {
VercelIntegrationLayout,
BillingLayout,
LogsLayout,
+ ReportsLayout,
}
export default ProjectLayout
diff --git a/studio/pages/project/[ref]/reports/api.tsx b/studio/pages/project/[ref]/reports/api.tsx
index 1c6257d180b..48707940d5c 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/ReportsLayout/ReportsLayout'
+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'
@@ -12,7 +12,7 @@ import {
renderRequestsPathsTable,
renderStatusCodesChart,
renderBotScores,
- renderUserAgents
+ renderUserAgents,
} from 'components/interfaces/Reports/renderers/ApiRenderers'
export const ApiReport: NextPageWithLayout = () => {
diff --git a/studio/pages/project/[ref]/reports/auth.tsx b/studio/pages/project/[ref]/reports/auth.tsx
index d57839ebf23..6a164a3e9f5 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/ReportsLayout/ReportsLayout'
+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'