Skip to content

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

fix: wrappers link when marketplace feature preview is enabled (#46718)

Raminder Singhcaf2c2c00cf4
diff --git a/apps/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.tsx b/apps/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.tsx
index f8f93ed79a6..d110a2ceee5 100644
--- a/apps/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.tsx
+++ b/apps/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.tsx
@@ -1,7 +1,10 @@
import { useParams } from 'common'
import { ArrowUpRight } from 'lucide-react'
-import { useIsColumnLevelPrivilegesEnabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext'
+import {
+ useIsColumnLevelPrivilegesEnabled,
+ useIsMarketplaceEnabled,
+} from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext'
import { useIsETLPrivateAlpha } from '@/components/interfaces/Database/Replication/useIsETLPrivateAlpha'
import type {
ProductMenuGroup,
@@ -39,6 +42,12 @@ export const useGenerateDatabaseMenu = (): ProductMenuGroup[] => {
const getDatabaseURL = (path: string) => `/project/${ref}/database/${path}`
+ // In the new marketplace revamped page the `category=wrapper` query param has
+ // changed to `type=wrapper`. So fix this link below based on which version is
+ // the user viewing.
+ const isMarketplaceEnabled = useIsMarketplaceEnabled()
+ const wrappersLinkParamName = isMarketplaceEnabled ? 'type' : 'category'
+
return [
{
title: 'Database Management',
@@ -148,7 +157,7 @@ export const useGenerateDatabaseMenu = (): ProductMenuGroup[] => {
showWrappers && {
name: 'Wrappers',
key: 'wrappers',
- url: `/project/${ref}/integrations?category=wrapper`,
+ url: `/project/${ref}/integrations?${wrappersLinkParamName}=wrapper`,
rightIcon: ExternalLinkIcon,
},
pgNetExtensionExists && {