This commit is contained in:
hamid zarghami
2025-07-14 10:04:07 +03:30
parent 2b6946e0b2
commit f53cb41739
2 changed files with 26 additions and 9 deletions
+7 -6
View File
@@ -1,15 +1,16 @@
import DefaulModal from '@/components/DefaulModal'
import { useSharedStore } from '@/shared/store/sharedStore'
import { useTranslation } from 'react-i18next'
import { FC } from 'react'
import { FC, useState } from 'react'
import { clx } from '@/helpers/utils'
import Input from '@/components/Input'
import { NumberFormat } from '@/config/func'
const BuySpace: FC = () => {
const { t } = useTranslation()
const { openBuySpace, setOpenBuySpace } = useSharedStore()
console.log(openBuySpace);
const [spaceSelected, setSpaceSelected] = useState(1)
return (
<DefaulModal
@@ -23,11 +24,11 @@ const BuySpace: FC = () => {
{t('space.select_space')}
</div>
<div className='mt-4 flex gap-4 flex-wrap'>
<div className={clx(
<div onClick={() => setSpaceSelected(1)} className={clx(
'bg-[#EBEDF5] border border-[#EBEDF5] cursor-pointer flex items-center text-xs h-10 px-6 rounded-lg',
// amountSelected === amount && 'border-black'
spaceSelected === 1 && 'border-black'
)}>
{'1000000'.toLocaleString()} تومان
1 گیگبایت
</div>
</div>
@@ -40,7 +41,7 @@ const BuySpace: FC = () => {
<div className='mt-6 flex gap-1'>
<div className='text-xs'>{t('space.price')}</div>
<div className='font-bold text-xs'>{'1000000'.toLocaleString()} تومان</div>
<div className='font-bold text-xs'>{NumberFormat(1000000)} تومان</div>
</div>
</div>
</DefaulModal >