diff --git a/src/common/modal/index.tsx b/src/common/modal/index.tsx index 2ce266e..6897f01 100644 --- a/src/common/modal/index.tsx +++ b/src/common/modal/index.tsx @@ -36,13 +36,16 @@ export default function MuiModal({ className="relative w-full h-full flex justify-center items-center border-none outline-none" > - +

- {title} {nameService && {nameService} } + {title && title} + {nameService && ( + {nameService} + )}

- + <> + +
+ {isDisabled && ( +
+

+ کانفیگ {configName} غیر + فعال است .{" "} + setIsOpen(true)} + > + تمدید + +

+
+ )} +
+

تاریخ خرید : {dateBuy}

+
  • + {configName} +
  • +
    + + +
    +
    + +
    - + ); }; export default ConfigItem; diff --git a/src/pages/profile/section/components/ModalConfigDetails.tsx b/src/pages/profile/section/components/ModalConfigDetails.tsx new file mode 100644 index 0000000..4c47ca5 --- /dev/null +++ b/src/pages/profile/section/components/ModalConfigDetails.tsx @@ -0,0 +1,53 @@ +import { Dispatch, SetStateAction } from "react"; +import MuiModal from "../../../../common/modal"; +import Button from "../../../../components/button"; +import { IoCopy } from "react-icons/io5"; +import Alert from "../../../../components/alert/Alert"; + +const ModalConfigDetails = ({ + isOpen, + setIsOpen, + isDisabled, + dateBuy, + nameConfig, +}: { + isOpen: boolean; + setIsOpen: Dispatch>; + isDisabled: boolean; + dateBuy: string; + nameConfig: string; +}) => { + return ( + + {isDisabled && {nameConfig} غیر فعال است } +
    +

    + تاریخ خرید : {dateBuy} +

    +
    + {isDisabled ? ( + + ) : ( + <> + + + + )} +
    +
    +
    + ); +}; + +export default ModalConfigDetails; diff --git a/src/pages/profile/section/components/ProfileImage.tsx b/src/pages/profile/section/components/ProfileImage.tsx new file mode 100644 index 0000000..6d8b597 --- /dev/null +++ b/src/pages/profile/section/components/ProfileImage.tsx @@ -0,0 +1,13 @@ +const ProfileImage = () => { + return ( +
    +
    + + + +
    +
    + ); +}; + +export default ProfileImage; diff --git a/src/types/props.d.ts b/src/types/props.d.ts index 245592f..e4e3546 100644 --- a/src/types/props.d.ts +++ b/src/types/props.d.ts @@ -4,7 +4,7 @@ export type MessageType = "info" | "danger" | "success" | "warning" | "dark"; export interface AlertProps { children: React.ReactNode; type?: "info" | "danger" | "success" | "warning" | "dark"; - message: string; + message?: string; } // begin Button.tsx @@ -99,7 +99,7 @@ export interface InputProps extends InputHTMLAttributes { export interface MuiModalProps { isOpenModal: boolean; setIsOpenModal: SetStateAction; - title: string; + title?: string; nameService?: string; submitText: string; submitOnClick?: () => void; @@ -111,3 +111,4 @@ export interface ConfigItemProps { configName: string; isDisabled: boolean; } +