fix: ESLint warning

perf/export-docx
Jimmy Liow 11 months ago
parent 58fc202f69
commit e6bc9b2dc2

@ -42,7 +42,7 @@ function Detail() {
}, },
]; ];
function detailTextRender(text, confirm) { function detailTextRender(_, confirm) {
const formattedText = confirm.PCI_ConfirmText;//.replace(/\;/g, '\n\n'); const formattedText = confirm.PCI_ConfirmText;//.replace(/\;/g, '\n\n');
return ( return (
<div className='whitespace-pre-line'> <div className='whitespace-pre-line'>
@ -51,19 +51,21 @@ function Detail() {
); );
} }
function attachmentRender(text, confirm) { function attachmentRender(_, confirm) {
return ( return (
<> <>
{confirm.attachmentList.map(attch => { {confirm.attachmentList.map(attch => {
return ( return (
<Tag bordered={false} icon={<FileOutlined />}><a href={attch.file_url} target='_blank'>{attch.file_name}</a></Tag> <Tag key={attch.file_name} bordered={false} icon={<FileOutlined />}>
<a href={attch.file_url} target='_blank' rel='noreferrer'>{attch.file_name}</a>
</Tag>
)} )}
)} )}
</> </>
); );
} }
function confirmRender(text, confirm) { function confirmRender(_, confirm) {
return ( return (
<Button type='link' onClick={() => showConfirmModal(confirm)}>{t('Confirm')}</Button> <Button type='link' onClick={() => showConfirmModal(confirm)}>{t('Confirm')}</Button>
); );
@ -128,7 +130,7 @@ function Detail() {
.finally(() => { .finally(() => {
setDataLoading(false); setDataLoading(false);
}); });
}, [reservationId]); }, [reservationId, getReservationDetail, notification]);
return ( return (
<> <>

@ -1,4 +1,4 @@
import { NavLink, useLocation } from 'react-router-dom' import { NavLink } from 'react-router-dom'
import { useState, useEffect } from 'react' import { useState, useEffect } from 'react'
import { Row, Col, Space, Button, Table, Typography, Modal, App, Select } from 'antd' import { Row, Col, Space, Button, Table, Typography, Modal, App, Select } from 'antd'
import dayjs from 'dayjs' import dayjs from 'dayjs'
@ -90,7 +90,6 @@ function Newest() {
) )
} }
const location = useLocation()
const [isModalOpen, setIsModalOpen] = useState(false) const [isModalOpen, setIsModalOpen] = useState(false)
const [dataLoading, setDataLoading] = useState(false) const [dataLoading, setDataLoading] = useState(false)
const [guideSelectOptions, setGuideSelectOptions] = useState([]) const [guideSelectOptions, setGuideSelectOptions] = useState([])
@ -113,7 +112,7 @@ function Newest() {
}) })
setGuideSelectOptions(selectOptions) setGuideSelectOptions(selectOptions)
}) })
}, []) }, [fetchAllGuideList])
const showCityGuideModal = (reservation) => { const showCityGuideModal = (reservation) => {
setDataLoading(true) setDataLoading(true)

Loading…
Cancel
Save