setting + danak learning + buy service + footer + header
This commit is contained in:
@@ -30,7 +30,7 @@ const DanakLearning: FC = () => {
|
||||
return (
|
||||
<div key={item.id} className='flex gap-3'>
|
||||
<Link to={Pages.learning.detail + item.id}>
|
||||
<img src={item.coverUrl} alt='danak-learning-1' className='w-36 h-24 object-cover rounded-2xl' />
|
||||
<img src={item.coverUrl} alt='danak-learning-1' className='w-24 object-cover rounded-2xl' />
|
||||
</Link>
|
||||
|
||||
<div className='text-xs'>
|
||||
|
||||
@@ -41,7 +41,7 @@ const BuyService: FC = () => {
|
||||
buyService.mutate(values, {
|
||||
onSuccess: () => {
|
||||
toast.success(t('success'))
|
||||
navigate(Pages.services.mine)
|
||||
navigate(Pages.receipts.index)
|
||||
},
|
||||
onError: (error: ErrorType) => {
|
||||
toast.error(error.response?.data?.error.message[0])
|
||||
|
||||
@@ -7,6 +7,7 @@ import PageLoading from '../../components/PageLoading'
|
||||
import Sms from './components/Sms'
|
||||
import ChangePassword from './components/ChangePassword'
|
||||
import { Helmet } from 'react-helmet-async'
|
||||
import TitleLine from '../../components/TitleLine'
|
||||
|
||||
const Setting: FC = () => {
|
||||
|
||||
@@ -61,6 +62,9 @@ const Setting: FC = () => {
|
||||
getSettings.data?.data?.settings?.map((item: any) => {
|
||||
return (
|
||||
<Fragment key={item.id}>
|
||||
<TitleLine
|
||||
title={t(`setting.${item.category}`)}
|
||||
/>
|
||||
{
|
||||
item.settings?.map((item: any) => {
|
||||
return (
|
||||
|
||||
@@ -52,7 +52,6 @@ const TransactionList: FC = () => {
|
||||
</div>
|
||||
<div className='flex gap gap-0.5 px-2 py-1 bg-green-100 rounded-lg text-[10px] text-success'>
|
||||
<ArrowRight size={12} color='#00BA4B' className='-rotate-45' />
|
||||
<div>{getTransactions.data?.data?.totalDepositsPercentChange || 0}٪</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,9 +68,8 @@ const TransactionList: FC = () => {
|
||||
<div className='text-[#101828] xl:text-xs text-[10px]'>
|
||||
{NumberFormat(getTransactions.data?.data?.totalWithdrawals)} {t('toman')}
|
||||
</div>
|
||||
<div className='flex gap gap-0.5 px-2 py-1 bg-green-100 rounded-lg text-[10px] text-success'>
|
||||
<ArrowRight size={12} color='#00BA4B' className='-rotate-45' />
|
||||
<div>{getTransactions.data?.data?.totalWithdrawalsPercentChange || 0}٪</div>
|
||||
<div className='flex gap gap-0.5 px-2 py-1 text-red-400 rounded-lg text-[10px] bg-red-100'>
|
||||
<ArrowRight size={12} color='red' className='rotate-45' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -88,10 +86,6 @@ const TransactionList: FC = () => {
|
||||
<div className='text-[#101828] xl:text-xs text-[10px]'>
|
||||
{NumberFormat(getTransactions.data?.data?.balance)} {t('toman')}
|
||||
</div>
|
||||
<div className='flex gap gap-0.5 px-2 py-1 text-red-400 rounded-lg text-[10px] bg-red-100'>
|
||||
<ArrowRight size={12} color='red' className='rotate-45' />
|
||||
<div>{getTransactions.data?.data?.balancePercentChange || 0}٪</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FC, useState } from 'react'
|
||||
import { FC, useEffect, useState } from 'react'
|
||||
import Button from '../../../components/Button'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { clx } from '../../../helpers/utils'
|
||||
@@ -42,6 +42,11 @@ const Online: FC = () => {
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setDesiredAmount(amountSelected)
|
||||
}, [amountSelected])
|
||||
|
||||
|
||||
return (
|
||||
<div className='mt-8 bg-white p-8 rounded-3xl'>
|
||||
<div>
|
||||
@@ -71,6 +76,7 @@ const Online: FC = () => {
|
||||
label={t('wallet.optional_price')}
|
||||
placeholder={t('wallet.enter_your_price')}
|
||||
onChange={(e) => setDesiredAmount(Number(e.target.value))}
|
||||
value={desiredAmount}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user