perf: Remove ssrInit completely (#20439)
* remove ssrInit completely * remove instances of dehydratedState * fix * refactor * fix type checks * fix linting * Refactor * Refactor * remove log
This commit is contained in:
1 parent
b5b4134b75
commit
75c79f76c8
30 files changed
+70
-209
No files matched your search
@@ -23,7 +23,7 @@ export const useAtomsEventTypePaymentInfo = ({
|
||||
return useQuery({
|
||||
queryKey: [QUERY_KEY, uid],
|
||||
queryFn: () => {
|
||||
return http?.get<ApiResponse<Omit<PaymentPageProps, "trpcState">>>(pathname).then((res) => {
|
||||
return http?.get<ApiResponse<PaymentPageProps>>(pathname).then((res) => {
|
||||
if (res.data.status === SUCCESS_STATUS) {
|
||||
onEventTypePaymentInfoSuccess?.();
|
||||
return res.data.data;
|
||||
|
||||
@@ -26,8 +26,8 @@ export const PaymentForm = ({
|
||||
onEventTypePaymentInfoFailure,
|
||||
}: {
|
||||
paymentUid: string;
|
||||
onPaymentSuccess?: (input: Omit<PaymentPageProps, "trpcState">) => void;
|
||||
onPaymentCancellation?: (input: Omit<PaymentPageProps, "trpcState">) => void;
|
||||
onPaymentSuccess?: (input: PaymentPageProps) => void;
|
||||
onPaymentCancellation?: (input: PaymentPageProps) => void;
|
||||
onEventTypePaymentInfoSuccess?: () => void;
|
||||
onEventTypePaymentInfoFailure?: () => void;
|
||||
}) => {
|
||||
|
||||
@@ -11,8 +11,8 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
const StripePaymentComponent = (
|
||||
props: Props & {
|
||||
onPaymentSuccess?: (input: Omit<PaymentPageProps, "trpcState">) => void;
|
||||
onPaymentCancellation?: (input: Omit<PaymentPageProps, "trpcState">) => void;
|
||||
onPaymentSuccess?: (input: PaymentPageProps) => void;
|
||||
onPaymentCancellation?: (input: PaymentPageProps) => void;
|
||||
}
|
||||
) => {
|
||||
const { t } = useLocale();
|
||||
@@ -82,7 +82,7 @@ const StripePaymentComponent = (
|
||||
});
|
||||
} else {
|
||||
setState({ status: "idle" });
|
||||
props.onPaymentSuccess?.(props as unknown as Omit<PaymentPageProps, "trpcState">);
|
||||
props.onPaymentSuccess?.(props as unknown as PaymentPageProps);
|
||||
if (props.location) {
|
||||
if (props.location.includes("integration")) {
|
||||
params.location = t("web_conferencing_details_to_follow");
|
||||
@@ -93,7 +93,7 @@ const StripePaymentComponent = (
|
||||
}
|
||||
}}
|
||||
onCancel={() => {
|
||||
props.onPaymentCancellation?.(props as unknown as Omit<PaymentPageProps, "trpcState">);
|
||||
props.onPaymentCancellation?.(props as unknown as PaymentPageProps);
|
||||
}}
|
||||
onPaymentElementChange={() => {
|
||||
setState({ status: "idle" });
|
||||
@@ -105,8 +105,8 @@ const StripePaymentComponent = (
|
||||
const StripePaymentForm = (
|
||||
props: Props & {
|
||||
uid: string;
|
||||
onPaymentSuccess?: (input: Omit<PaymentPageProps, "trpcState">) => void;
|
||||
onPaymentCancellation?: (input: Omit<PaymentPageProps, "trpcState">) => void;
|
||||
onPaymentSuccess?: (input: PaymentPageProps) => void;
|
||||
onPaymentCancellation?: (input: PaymentPageProps) => void;
|
||||
}
|
||||
) => {
|
||||
const stripePromise = getStripe(props.payment.data.stripe_publishable_key as any);
|
||||
|
||||
Reference in new issue
Block a user