diff --git a/src/components/global/Accardion.tsx b/src/components/global/Accardion.tsx deleted file mode 100644 index e4400f2a..00000000 --- a/src/components/global/Accardion.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import React, { ReactElement } from 'react'; -import { Accordion, AccordionDetails, AccordionSummary } from '@mui/material'; -import { MdExpandMore } from 'react-icons/md'; - -type AcProps = { - readonly title?: string; - childs: AcChildProps[]; -}; - -type AcChildProps = { - title: string; - id: string; - icon?: ReactElement; - detailsComponent: ReactElement; -}; - -export default function Accardion({ title, childs }: AcProps) { - const [expanded, setExpanded] = React.useState(false); - - const handleChange = - (panel: string) => (_event: React.SyntheticEvent, isExpanded: boolean) => { - setExpanded(isExpanded ? panel : false); - }; - - return ( - <> -

{title}

- {childs.map((el) => ( - - - } - aria-controls={`${el.id}-content`} - id={el.id} - > -
-
- {el.icon} -
-

{el.title}

-
-
- - {el.detailsComponent} - -
- ))} - - ); -} diff --git a/src/components/global/Card.tsx b/src/components/global/Card.tsx deleted file mode 100644 index fc0ae5c2..00000000 --- a/src/components/global/Card.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react"; -import clsx from "clsx"; -import Image from "next/image"; - -type Props = { - className?: string; - title: string; - srcImage: string; - srcWidth: number; -}; - -export default function Card({ className, title, srcImage, srcWidth }: Props) { - return ( -
-

{title}

-
-
- Picture of the author -
-
-
- ); -} - -Card.defaultProps = { - title: "", - srcWidth: "400", -}; diff --git a/src/components/global/CustomDatePicker.tsx b/src/components/global/CustomDatePicker.tsx deleted file mode 100644 index 45ede02b..00000000 --- a/src/components/global/CustomDatePicker.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import React, { FC, RefObject, useState } from 'react'; -import '@hassanmojab/react-modern-calendar-datepicker/lib/DatePicker.css'; -import DatePicker, { - DayRange, -} from '@hassanmojab/react-modern-calendar-datepicker'; -import { FiCalendar } from 'react-icons/fi'; -import clsx from 'clsx'; -import moment from 'moment'; - -interface IProps { - placeholder?: string; - className: string; - onClick: any; -} - -const CustomDatePicker: FC = ({ - placeholder, - className, - onClick, -}): JSX.Element => { - const [dayRange, setDayRange] = useState({ - from: null, - to: null, - }); - - const renderCustomInput = ({ - ref, - }: { - ref: RefObject | any; - }) => ( -
- - -
- ); - - return ( - setDayRange(date)} - renderInput={renderCustomInput} - colorPrimary="#35B9B7" // added this - colorPrimaryLight="#D0FBF8" // and this - calendarPopperPosition="bottom" - /> - ); -}; - -CustomDatePicker.defaultProps = { - placeholder: 'Specific date', -}; - -export default CustomDatePicker; diff --git a/src/components/global/CustomModal.tsx b/src/components/global/CustomModal.tsx deleted file mode 100644 index 3209fa9a..00000000 --- a/src/components/global/CustomModal.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { Dialog, DialogTitle, DialogContent } from '@mui/material'; -import { IoClose } from 'react-icons/io5'; - -type IModalProps = { - isOpen: boolean; - toggleModal: (arg0: boolean) => void; - children: any; - hasClose: boolean; -}; -export default function ConfirmModal({ - isOpen, - toggleModal, - children, - hasClose, - ...props -}: IModalProps) { - const handleClose = () => { - toggleModal(false); - }; - return ( - <> - - {hasClose ? ( - - - - ) : ( - '' - )} - {children} - - - ); -} diff --git a/src/components/global/DatePeriodRange.tsx b/src/components/global/DatePeriodRange.tsx deleted file mode 100644 index 826d0b95..00000000 --- a/src/components/global/DatePeriodRange.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import clsx from 'clsx'; -import React, { useState } from 'react'; -import CustomDatePicker from './CustomDatePicker'; - -type dateItems = { - title: string; - icon?: JSX.Element; - value: any; -}; - -const datePeriod: dateItems[] = [ - { - title: 'Last 35 days', - value: 1, - }, - { - title: '3M', - value: 2, - }, - { - title: '6M', - value: 3, - }, - { - title: '1Y', - value: 4, - }, -]; - -type datePeriodRangeProps = { - activePeriod: string | number; - onChangeActivePeriod: (e: number) => void; -}; - -export default function DatePeriodRange({ - activePeriod, - onChangeActivePeriod, -}: datePeriodRangeProps) { - return ( -
-
    - {datePeriod.length > 0 - ? datePeriod.map((el) => ( -
  • onChangeActivePeriod(el.value)} - > - {el.icon ? el.icon : ''} -
    {el.title}
    -
  • - )) - : ''} -
-
- ); -} diff --git a/tsconfig.json b/tsconfig.json index b194c6be..e313683d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,5 +22,5 @@ "jest.config.js", "jest.setup.js" ], - "exclude": ["node_modules", "./src/components/global/CustomDatePicker.tsx"] + "exclude": ["node_modules"] }