Fix duplicate query param missing issue (#9328)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2023-06-05 09:50:34 +00:00
1 parent 6aa83102e4
commit 785a08ba2c
2 files changed
+21 -3

No files matched your search

@@ -82,7 +82,7 @@ function RoutingForm({ form, profile, ...restProps }: Props) {
}, [customPageMessage]);
const responseMutation = trpc.viewer.appRoutingForms.public.response.useMutation({
onSuccess: () => {
onSuccess: async () => {
const decidedActionWithFormResponse = decidedActionWithFormResponseRef.current;
if (!decidedActionWithFormResponse) {
return;
@@ -98,7 +98,7 @@ function RoutingForm({ form, profile, ...restProps }: Props) {
if (decidedAction.type === "customPageMessage") {
setCustomPageMessage(decidedAction.value);
} else if (decidedAction.type === "eventTypeRedirectUrl") {
router.push(`/${decidedAction.value}?${allURLSearchParams}`);
await router.push(`/${decidedAction.value}?${allURLSearchParams}`);
} else if (decidedAction.type === "externalRedirectUrl") {
window.parent.location.href = `${decidedAction.value}?${allURLSearchParams}`;
}