Files
calendar/packages/app-store/routing-forms/lib/createFallbackRoute.ts
T
b8d4fccbab feat: Rerouting a booking with corrected responses (#17074)
* POC working with no TS error

* cleanup

* Fix query booking

* Simplify things

* Support rerouting to different event

* self-review fixes

* Some improvements

* add more tests

* Remove members relation query

* Udits feedback

* Dont show CTAs when non-eventTypeRedirectUrl action route is chosen

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2024-10-18 17:11:50 -04:00

18 lines
572 B
TypeScript

import { Utils as QbUtils } from "react-awesome-query-builder";
import type { GlobalRoute, LocalRoute, SerializableRoute } from "../types/types";
import { RouteActionType } from "../zod";
export const createFallbackRoute = (): Exclude<SerializableRoute, GlobalRoute> => {
const uuid = QbUtils.uuid();
return {
id: uuid,
isFallback: true,
action: {
type: RouteActionType.CustomPageMessage,
value: "Thank you for your interest! We will be in touch soon.",
},
queryValue: { id: uuid, type: "group" } as LocalRoute["queryValue"],
};
};