add nuqs to secret api key creation

This commit is contained in:
Francesco Sansalvadore committed 2025-11-05 17:23:58 +01:00
1 parent b84dc174a4
commit a2129d7142
1 file changed
+5 -1
@@ -27,6 +27,7 @@ import * as z from 'zod'
import { useParams } from 'common'
import { useAPIKeyCreateMutation } from 'data/api-keys/api-key-create-mutation'
import { Plus, ShieldCheck } from 'lucide-react'
import { parseAsBoolean, useQueryState } from 'nuqs'
const NAME_SCHEMA = z
.string()
@@ -46,7 +47,10 @@ const SCHEMA = z.object({
})
const CreateSecretAPIKeyDialog = () => {
const [visible, setVisible] = useState(false)
const [visible, setVisible] = useQueryState(
'new',
parseAsBoolean.withDefault(false).withOptions({ history: 'push', clearOnDefault: true })
)
const { ref: projectRef } = useParams()
const onClose = (value: boolean) => {