mirror of
https://github.com/supabase/supabase.git
synced 2026-06-13 01:39:53 +08:00
Restores proper content in new marketplace detail overview pages compared to the legacy overview pages. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Data API URL settings and a visible "Required extensions" section across integration overviews. * Unified install/manage UIs for webhooks, Stripe Sync, wrappers, queues, and others; marketplace mode now shows marketplace-specific overview content. * **Style** * Improved marketplace detail rail and filter-bar button styling; refined list/link row visuals. * **Refactor** * Overview pages reorganized to branch on marketplace mode and extract shared overview content for consistency. * **Tests** * Stabilized integration overview test data for deterministic runs. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46179?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
53 lines
1.9 KiB
TypeScript
53 lines
1.9 KiB
TypeScript
import { useParams } from 'common'
|
|
import Link from 'next/link'
|
|
import { Button } from 'ui'
|
|
import { Admonition } from 'ui-patterns'
|
|
|
|
import { IntegrationOverviewTab } from '../Integration/IntegrationOverviewTab'
|
|
import { RequiredExtensionsSection } from '../Integration/RequiredExtensionsSection'
|
|
import { useIsMarketplaceEnabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext'
|
|
import { useDatabaseExtensionsQuery } from '@/data/database-extensions/database-extensions-query'
|
|
import { useQueuesExposePostgrestStatusQuery } from '@/data/database-queues/database-queues-expose-postgrest-status-query'
|
|
import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
|
|
|
|
const QueuesContent = () => {
|
|
const { ref } = useParams()
|
|
const { data: project } = useSelectedProjectQuery()
|
|
const { data: isExposed } = useQueuesExposePostgrestStatusQuery({
|
|
projectRef: project?.ref,
|
|
connectionString: project?.connectionString,
|
|
})
|
|
|
|
const { data: extensions = [] } = useDatabaseExtensionsQuery({
|
|
projectRef: project?.ref,
|
|
connectionString: project?.connectionString,
|
|
})
|
|
const isQueuesInstalled = !!extensions.find((x) => x.name === 'pgmq')?.installed_version
|
|
|
|
if (isExposed) return null
|
|
|
|
return (
|
|
<Admonition
|
|
type="default"
|
|
title="Queues can be managed via any Supabase client library or PostgREST endpoints"
|
|
>
|
|
<p>
|
|
You may choose to toggle the exposure of Queues through Data APIs via the queues settings
|
|
</p>
|
|
|
|
{isQueuesInstalled && (
|
|
<Button asChild type="default" className="mt-2">
|
|
<Link href={`/project/${ref}/integrations/queues/settings`}>Manage queues settings</Link>
|
|
</Button>
|
|
)}
|
|
</Admonition>
|
|
)
|
|
}
|
|
|
|
export const QueuesOverviewTab = () => {
|
|
const isMarketplaceEnabled = useIsMarketplaceEnabled()
|
|
|
|
if (isMarketplaceEnabled) return <RequiredExtensionsSection />
|
|
return <IntegrationOverviewTab actions={<QueuesContent />} />
|
|
}
|