Skip to content

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

Fix logic

Terry Sutton706b27ff5285
diff --git a/studio/components/layouts/SettingsLayout/SettingsLayout.tsx b/studio/components/layouts/SettingsLayout/SettingsLayout.tsx
index e583cfcd3c7..4f98e620b59 100644
--- a/studio/components/layouts/SettingsLayout/SettingsLayout.tsx
+++ b/studio/components/layouts/SettingsLayout/SettingsLayout.tsx
@@ -18,12 +18,11 @@ const SettingsLayout: FC<Props> = ({ title, children }) => {
const projectBaseInfo = ui.selectedProjectBaseInfo
const router = useRouter()
- let page
// billing pages live under /billing/invoices and /billing/subscription, etc
// so we need to pass the [5]th part of the url to the menu
- router.pathname.includes('billing')
- ? (page = router.pathname.split('/')[5])
- : (page = router.pathname.split('/')[4])
+ const page = router.pathname.includes('billing')
+ ? router.pathname.split('/')[5]
+ : router.pathname.split('/')[4]
const menuRoutes = generateSettingsMenu(projectRef, projectBaseInfo)