-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
perf: Remove two trpc.viewer.public.event
calls & use EventTypeRepository in RSCs
#20536
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (04/04/25)1 reviewer was added to this PR based on Keith Williams's automation. |
…t-to-eventType-router
event: { | ||
data?: Pick<BookerEvent, "length" | "bookingFields" | "price" | "currency" | "metadata"> | null; | ||
}; | ||
eventData: Pick<RouterOutputs["viewer"]["eventTypes"]["get"], "price" | "currency" | "length" | "metadata">; |
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.
bookingFields
isn't needed
packages/features/embed/Embed.tsx
Outdated
@@ -367,7 +366,7 @@ const EmailEmbed = ({ | |||
locale={i18n.language} | |||
browsingDate={month ? dayjs(month) : undefined} | |||
selected={dayjs(selectedDate)} | |||
weekStart={weekdayToWeekIndex(event?.data?.subsetOfUsers?.[0]?.weekStart)} | |||
weekStart={weekdayToWeekIndex(eventTypeData?.users?.[0]?.weekStart)} |
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.
double check on this
import { useBookerTime } from "../hooks/useBookerTime"; | ||
|
||
const BookEventFormWrapper = ({ children, onCancel }: { onCancel: () => void; children: ReactNode }) => { | ||
const { data } = useEvent(); |
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.
Removing trpc.viewer.public.event
call
@@ -271,7 +271,6 @@ const EmailEmbed = ({ | |||
], | |||
shallow | |||
); | |||
const event = useEvent(); |
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.
Removing trpc.viewer.public.event
call
trpc.viewer.public.event
calls & use EventTypeRepository in RSCs
…t-to-eventType-router
What does this PR do?
trpc.viewer.public.event
calls by refactoring to use already server-fetched dataMandatory Tasks (DO NOT REMOVE)
How should this be tested?