Routing-Forms/External Redirect URL improvement (#8487)

This commit is contained in:
Hariom Balhara
2023-04-24 19:42:50 +05:30
committed by GitHub
parent 496cb265d1
commit 5dac6896d2
2 changed files with 3 additions and 3 deletions
@@ -215,14 +215,14 @@ const Route = ({
name="externalRedirectUrl"
className="border-default flex w-full flex-grow text-sm"
containerClassName="w-full mt-2"
type="text"
type="url"
required
labelSrOnly
value={route.action.value}
onChange={(e) => {
setRoute(route.id, { action: { ...route.action, value: e.target.value } });
}}
placeholder="Enter External Redirect URL"
placeholder="https://example.com"
/>
) : (
<div className="block w-full">
@@ -86,7 +86,7 @@ function RoutingForm({ form, profile, ...restProps }: inferSSRProps<typeof getSe
} else if (decidedAction.type === "eventTypeRedirectUrl") {
router.push(`/${decidedAction.value}`);
} else if (decidedAction.type === "externalRedirectUrl") {
window.location.href = decidedAction.value;
window.parent.location.href = decidedAction.value;
}
// showToast("Form submitted successfully! Redirecting now ...", "success");
},