🚸 redirect to list after update

This commit is contained in:
Fred KISSIE
2026-09-22 19:15:36 +02:00
parent 3e29e110f2
commit 404594ffd7
+4 -3
View File
@@ -227,7 +227,9 @@ export default function RedirectForm({
// Mirror is UI-only state; on edit, infer it from whether the saved // Mirror is UI-only state; on edit, infer it from whether the saved
// destination already equals the source host. // destination already equals the source host.
const [sameDomainAsSource, setSameDomainAsSource] = useState( const [sameDomainAsSource, setSameDomainAsSource] = useState(
Boolean(redirect && sourceHost && redirect.destinationHost === sourceHost) Boolean(
redirect && sourceHost && redirect.destinationHost === sourceHost
)
); );
useEffect(() => { useEffect(() => {
@@ -280,7 +282,6 @@ export default function RedirectForm({
title: t("success"), title: t("success"),
description: t("redirectUpdated") description: t("redirectUpdated")
}); });
router.refresh();
} else { } else {
const res = await api.put< const res = await api.put<
AxiosResponse<CreateRedirectResponse> AxiosResponse<CreateRedirectResponse>
@@ -289,8 +290,8 @@ export default function RedirectForm({
title: t("success"), title: t("success"),
description: t("redirectCreated") description: t("redirectCreated")
}); });
router.push(`/${orgId}/settings/redirects/`);
} }
router.push(`/${orgId}/settings/redirects/`);
} catch (e) { } catch (e) {
toast({ toast({
variant: "destructive", variant: "destructive",