mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 15:27:27 +00:00
improvement: clear query params after setup to avoid false error messages
This commit is contained in:
@@ -2,7 +2,7 @@ import { useEffect } from "react";
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { useSearch } from "@tanstack/react-router";
|
import { useNavigate, useSearch } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { OrgPermissionCan } from "@app/components/permissions";
|
import { OrgPermissionCan } from "@app/components/permissions";
|
||||||
import { Button, NoticeBanner, PageHeader, Pagination } from "@app/components/v2";
|
import { Button, NoticeBanner, PageHeader, Pagination } from "@app/components/v2";
|
||||||
@@ -36,6 +36,8 @@ export const SecretScanningPage = withPermission(
|
|||||||
from: ROUTE_PATHS.Organization.SecretScanning.id
|
from: ROUTE_PATHS.Organization.SecretScanning.id
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const { control, watch } = useForm<SecretScanningFilterFormData>({
|
const { control, watch } = useForm<SecretScanningFilterFormData>({
|
||||||
resolver: zodResolver(secretScanningFilterFormSchema),
|
resolver: zodResolver(secretScanningFilterFormSchema),
|
||||||
defaultValues: {}
|
defaultValues: {}
|
||||||
@@ -86,6 +88,9 @@ export const SecretScanningPage = withPermission(
|
|||||||
sessionId: String(queryParams.state)
|
sessionId: String(queryParams.state)
|
||||||
});
|
});
|
||||||
if (isLinked) {
|
if (isLinked) {
|
||||||
|
await navigate({
|
||||||
|
to: "/organization/secret-scanning"
|
||||||
|
});
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user