This commit is contained in:
hamid zarghami
2025-01-27 20:36:14 +03:30
parent 22482aa20a
commit ce0019fde0
18 changed files with 523 additions and 79 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ const DatePickerComponent: FC<Props> = (props: Props) => {
const formattedDate = `${value.year}/${value.month.number}/${value.day}`;
props.onChange(formattedDate);
}
}, [props, value]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [value]);
useEffect(() => {
if (props.defaulValue && !value) {
+44
View File
@@ -0,0 +1,44 @@
import { FC } from 'react'
import DefaulModal from './DefaulModal'
import { useTranslation } from 'react-i18next'
import Button from './Button'
type Props = {
isLoading?: boolean,
close: () => void,
isOpen: boolean,
onConfrim: () => void,
}
const ModalConfrim: FC<Props> = (props: Props) => {
const { t } = useTranslation('global')
return (
<DefaulModal
open={props.isOpen}
close={props.close}
title_header={t('confrim.subject')}
isHeader
>
<div className='mt-6'>
<div className='text-sm text-center'> {t('confrim.content')}</div>
<div className='flex gap-4 justify-center mt-10'>
<Button
label={t('confrim.yes')}
onClick={props.onConfrim}
isLoading={props.isLoading}
/>
<Button
label={t('confrim.cancel')}
className='bg-transparent text-black border border-primary'
onClick={props.close}
/>
</div>
</div>
</DefaulModal>
)
}
export default ModalConfrim
+1 -1
View File
@@ -7,7 +7,7 @@ const PageLoading: FC = () => {
const { t } = useTranslation('global')
return (
<div className='flex bg-white w-fit mx-auto flex-col gap-4 items-center'>
<div className='flex bg-transparent w-fit mx-auto flex-col gap-4 items-center'>
<img src={Logo} alt='logo' className='w-28' />
<div className='text-xs text-gray-700'>
{t('loading')}