This commit is contained in:
hamid zarghami
2025-07-29 17:00:36 +03:30
parent 5502e45d10
commit ef26c63e33
6 changed files with 35 additions and 46 deletions
+8 -12
View File
@@ -3,12 +3,11 @@ import { FC, useState } from 'react'
import Table from '../../components/Table';
import { ColumnType } from '../../components/types/TableTypes';
import { InfoCircle, Refresh2, Trash, RecoveryConvert } from 'iconsax-react';
import { RowActionItem } from '../../components/RowActionsDropdown';
import RowActionsDropdown, { RowActionItem } from '../../components/RowActionsDropdown';
import { useNavigate } from 'react-router-dom';
import { useEmptySpam, useGetSpamMessages } from './hooks/useSpamData';
import { SpamMessage } from './types/SpamTypes';
import { useEmailActions } from '@/hooks/useEmailActions';
import Button from '@/components/Button';
import ModalConfrim from '@/components/ModalConfrim';
import { ErrorType } from '@/helpers/types';
import { toast } from '@/components/Toast';
@@ -142,6 +141,13 @@ const List: FC = () => {
className={`cursor-pointer min-w-[18px] ${isFetching ? 'animate-spin-reverse' : ''}`}
onClick={() => refetch()}
/>
<RowActionsDropdown actions={[
{
label: 'حذف همه',
icon: <Trash size={18} color='black' />,
onClick: () => setShowModal(true)
}
]} />
</div>
);
@@ -220,16 +226,6 @@ const List: FC = () => {
<div className='mt-2 md:mt-4 px-2 md:px-0'>
<div className='flex items-center justify-between'>
<h1>هرزنامه ها</h1>
<Button
className='w-fit px-6'
onClick={() => setShowModal(true)}
loading={isPending}
>
<div className='flex items-center gap-2'>
<Trash size={16} color="white" />
<span>حذف همه</span>
</div>
</Button>
</div>
<Filters