-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: booking redirect page url is now has uid in it's parameters #19522
base: main
Are you sure you want to change the base?
Conversation
@retrogtx is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (02/25/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (02/25/25)1 label was added to this PR based on Keith Williams's automation. |
if (booking.uid) { | ||
url.searchParams.append("uid", booking.uid); | ||
} | ||
|
||
const bookingExtraParams = getBookingRedirectExtraParams(booking); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not make it work by just modifying getBookingRedirectExtraParams
fn. That is the purpose of the function to support passing anything that is needed.
const newSearchParams = getNewSearchParams({ | ||
query: { | ||
...query, | ||
...bookingExtraParams, | ||
...otherParams, | ||
}, | ||
searchParams: searchParams ?? undefined, | ||
}); | ||
|
||
newSearchParams.forEach((value, key) => { | ||
url.searchParams.append(key, value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if bookingExtraParams
had uid
, and we already have:
newSearchParams.forEach((value, key) => {
url.searchParams.append(key, value);
```,
Why wasn't `uid` being added to search params? `getNewSearchParams` wasn't handling it?
I would improve on the logic there instead of creating a new logic specially for booking uid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yea that is what I did first, but then to get the uid first in the url is why I added the additional logic
.filter((key) => redirectQueryParamKeys.includes(key)) | ||
.reduce<ResultType>((obj, key) => { | ||
if (key === "responses") return extractResponseDetails(booking, obj); | ||
if (key === "user") return extractUserDetails(booking, obj); | ||
if (key === "attendees") return extractAttendeesAndGuests(booking, obj); | ||
return { ...obj, [key]: booking[key] }; | ||
}, {}); | ||
}, result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the only place where result
is used? if so, no need to create a const
up there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea also that can be done by booking.uid
result is not needed at all, thnx
E2E results are ready! |
What does this PR do?
Adds UID in the redirect URL after the websites domain in the form of ?uid=youruidxyz
Loom Video: https://www.loom.com/share/d3286e56a7514d5a8f37539ac0b97a23?sid=8ff255d1-5274-4bfe-8c83-546d54e766d6
Mandatory Tasks (DO NOT REMOVE)