From 9d99d6f90eef2a59f8a69560d687e64f54a4063e Mon Sep 17 00:00:00 2001 From: Daniil Chemerkin Date: Tue, 18 Jun 2024 22:10:03 +0000 Subject: [PATCH] Develop --- src/api/resources/Palmistry.ts | 13 +- src/components/Modal/index.tsx | 11 +- src/components/Modal/styles.module.css | 5 + .../components => }/PaymentModal/index.tsx | 8 +- .../PaymentModal/styles.module.css | 0 .../v1/pages/EmailEnterPage/index.tsx | 47 +++-- .../components/PaymentModal/index.tsx | 197 ------------------ .../ABDesign/v1/pages/TrialPayment/index.tsx | 7 +- .../pages/TrialPaymentWithDiscount/index.tsx | 4 +- .../MarketingTrialPayment/index.tsx | 13 +- .../components/PaymentModal/styles.module.css | 54 ----- src/components/pages/TrialPayment/index.tsx | 5 +- .../pages/TrialPaymentWithDiscount/index.tsx | 4 +- .../payment-screen/payment-screen.tsx | 2 +- .../palmistry/scanned-photo/scanned-photo.css | 20 -- .../palmistry/scanned-photo/scanned-photo.tsx | 192 ++++++----------- .../step-scan-photo/step-scan-photo.tsx | 62 ++++-- .../palmistry/step-upload/step-upload.tsx | 34 ++- .../authentication/use-authentication.ts | 1 + src/routes.ts | 2 +- src/store/index.ts | 2 + src/store/palmistry.ts | 10 +- 22 files changed, 235 insertions(+), 458 deletions(-) rename src/components/{pages/TrialPayment/components => }/PaymentModal/index.tsx (96%) rename src/components/{pages/ABDesign/v1/pages/TrialPayment/components => }/PaymentModal/styles.module.css (100%) delete mode 100644 src/components/pages/ABDesign/v1/pages/TrialPayment/components/PaymentModal/index.tsx delete mode 100644 src/components/pages/TrialPayment/components/PaymentModal/styles.module.css diff --git a/src/api/resources/Palmistry.ts b/src/api/resources/Palmistry.ts index 1e63920..bba6244 100644 --- a/src/api/resources/Palmistry.ts +++ b/src/api/resources/Palmistry.ts @@ -4,10 +4,19 @@ export interface Payload { formData: FormData; } -export type Response = IPalmistryLine[]; +export type Response = { + fingers: IPalmistryFinger[]; + lines: IPalmistryLine[]; +}; + +export interface IPalmistryFinger { + name: string; + point: IPalmistryPoint; +} export interface IPalmistryLine { - line: string; + name: string; + line: number; points: IPalmistryPoint[]; } diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index 009f600..d3e0236 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -7,6 +7,7 @@ interface ModalProps { isCloseButtonVisible?: boolean; className?: string; containerClassName?: string; + type?: "hidden" | "normal"; onClose?: () => void; } @@ -16,6 +17,7 @@ function Modal({ isCloseButtonVisible = true, className = "", containerClassName = "", + type = "normal", onClose, }: ModalProps): JSX.Element { const handleClose = (event: React.MouseEvent) => { @@ -34,9 +36,14 @@ function Modal({ }; }, [open]); - if (!open) return <>; + if (!open && type === "normal") return <>; return ( -
+
{isCloseButtonVisible && (