Skip to content

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

Update apps/docs/components/reference/RefSectionHandler.tsx

Copple75d4e815e7c9
diff --git a/apps/docs/components/reference/RefSectionHandler.tsx b/apps/docs/components/reference/RefSectionHandler.tsx
index 2cb514acb82..b1b5bebf134 100644
--- a/apps/docs/components/reference/RefSectionHandler.tsx
+++ b/apps/docs/components/reference/RefSectionHandler.tsx
@@ -32,17 +32,16 @@ const RefSectionHandler = (props: RefSectionHandlerProps) => {
})
function getPageTitle() {
- if (props.type === 'client-lib') {
- return props.spec.info.title
+ switch (props.type) {
+ case 'client-lib':
+ return props.spec.info.title
+ case 'cli':
+ return 'Supabase CLI reference'
+ case 'api':
+ return 'Supabase API reference'
+ default:
+ return 'Supabase Docs'
}
- if (props.type === 'cli') {
- return 'Supabase CLI reference'
- }
-
- if (props.type === 'api') {
- return 'Supabase API reference'
- }
- return 'Supabase Docs'
}
const pageTitle = getPageTitle()