change list invoce and tickets + pwa + ...
This commit is contained in:
@@ -14,13 +14,14 @@ const TicketList: FC = () => {
|
||||
const { t } = useTranslation('global')
|
||||
const [searchParams] = useSearchParams()
|
||||
const [customerId, setCustomerId] = useState<string>('')
|
||||
const [activeTab, setActiveTab] = useState<'ANSWERED' | 'PENDING' | 'CLOSED'>('PENDING')
|
||||
const [activeTab, setActiveTab] = useState<'ANSWERED' | 'PENDING' | 'CLOSED' | ''>('PENDING')
|
||||
const getTicket = useGetTickets(activeTab, customerId)
|
||||
|
||||
useEffect(() => {
|
||||
const urlCustomerId = searchParams.get('user')
|
||||
if (urlCustomerId) {
|
||||
setCustomerId(urlCustomerId)
|
||||
setActiveTab('')
|
||||
}
|
||||
}, [searchParams])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user