mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 19:35:06 +03:00
Fix link to wrappers integrations from database page (#30731)
* Fix link to wrappers integrations from database page * Update next.config redirects for webhooks and wrappers * Fix link to webhooks * Move the search and selectedCategory into useQueryState. --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
This commit is contained in:
1 parent
08a45f4fa0
commit
8fc6dab790
3 files changed
+16
-9
No files matched your search
@@ -1,9 +1,10 @@
|
||||
import { Search } from 'lucide-react'
|
||||
import { parseAsString, useQueryState } from 'nuqs'
|
||||
|
||||
import AlertError from 'components/ui/AlertError'
|
||||
import NoSearchResults from 'components/ui/NoSearchResults'
|
||||
import { Search } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { buttonVariants, cn, Tabs_Shadcn_, TabsList_Shadcn_, TabsTrigger_Shadcn_ } from 'ui'
|
||||
import { Admonition } from 'ui-patterns'
|
||||
import { Admonition } from 'ui-patterns/admonition'
|
||||
import { Input } from 'ui-patterns/DataInputs/Input'
|
||||
import { IntegrationCard, IntegrationLoadingCard } from './IntegrationCard'
|
||||
import { useInstalledIntegrations } from './useInstalledIntegrations'
|
||||
@@ -11,8 +12,14 @@ import { useInstalledIntegrations } from './useInstalledIntegrations'
|
||||
type IntegrationCategory = 'all' | 'wrapper' | 'postgres_extensions' | 'custom'
|
||||
|
||||
export const AvailableIntegrations = () => {
|
||||
const [search, setSearch] = useState('')
|
||||
const [selectedCategory, setSelectedCategory] = useState<IntegrationCategory>('all')
|
||||
const [selectedCategory, setSelectedCategory] = useQueryState(
|
||||
'category',
|
||||
parseAsString.withDefault('all').withOptions({ clearOnDefault: true })
|
||||
)
|
||||
const [search, setSearch] = useQueryState(
|
||||
'search',
|
||||
parseAsString.withDefault('').withOptions({ clearOnDefault: true })
|
||||
)
|
||||
|
||||
const { availableIntegrations, installedIntegrations, error, isError, isLoading, isSuccess } =
|
||||
useInstalledIntegrations()
|
||||
|
||||
@@ -112,7 +112,7 @@ export const generateDatabaseMenu = (
|
||||
{
|
||||
name: 'Wrappers',
|
||||
key: 'wrappers',
|
||||
url: `/project/${ref}/integrations/wrappers`,
|
||||
url: `/project/${ref}/integrations?category=wrapper`,
|
||||
rightIcon: <ArrowUpRight strokeWidth={1} className="h-4 w-4" />,
|
||||
items: [],
|
||||
},
|
||||
@@ -121,7 +121,7 @@ export const generateDatabaseMenu = (
|
||||
{
|
||||
name: 'Webhooks',
|
||||
key: 'hooks',
|
||||
url: `/project/${ref}/integrations/hooks`,
|
||||
url: `/project/${ref}/integrations/webhooks/overview`,
|
||||
rightIcon: <ArrowUpRight strokeWidth={1} className="h-4 w-4" />,
|
||||
items: [],
|
||||
},
|
||||
|
||||
@@ -402,12 +402,12 @@ const nextConfig = {
|
||||
{
|
||||
permanent: true,
|
||||
source: '/project/:ref/database/webhooks',
|
||||
destination: '/project/:ref/integrations/webhooks',
|
||||
destination: '/project/:ref/integrations/webhooks/overview',
|
||||
},
|
||||
{
|
||||
permanent: true,
|
||||
source: '/project/:ref/database/wrappers',
|
||||
destination: '/project/:ref/integrations/wrappers',
|
||||
destination: '/project/:ref/integrations?category=wrapper',
|
||||
},
|
||||
{
|
||||
permanent: true,
|
||||
|
||||
Reference in new issue
Block a user