mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
* Replace all usage of useProjectContext with useSelectedProjectQuery * Replace all usage of useSelectedProject with useSelectedProjectQuery * Replace all usage of useProjectByRef with useProjectByRefQuery * Replace all usage of useSelectedOrganization with useSelectedOrganizationQuery * Deprecate useSelectedProject, useSelectedOrganization, and useProjectByRef hooks * Deprecate ProjecContext
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
import { useParams } from 'common'
|
|
import { useQueuesExposePostgrestStatusQuery } from 'data/database-queues/database-queues-expose-postgrest-status-query'
|
|
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
|
|
import Link from 'next/link'
|
|
import { Button } from 'ui'
|
|
import { Admonition } from 'ui-patterns'
|
|
import { IntegrationOverviewTab } from '../Integration/IntegrationOverviewTab'
|
|
|
|
export const QueuesOverviewTab = () => {
|
|
const { ref } = useParams()
|
|
const { data: project } = useSelectedProjectQuery()
|
|
|
|
const { data: isExposed } = useQueuesExposePostgrestStatusQuery({
|
|
projectRef: project?.ref,
|
|
connectionString: project?.connectionString,
|
|
})
|
|
|
|
return (
|
|
<IntegrationOverviewTab
|
|
actions={
|
|
!isExposed ? (
|
|
<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>
|
|
<Button asChild type="default">
|
|
<Link href={`/project/${ref}/integrations/queues/settings`}>
|
|
Manage queues settings
|
|
</Link>
|
|
</Button>
|
|
</Admonition>
|
|
) : null
|
|
}
|
|
/>
|
|
)
|
|
}
|