Skip to content

Commit

Permalink
feat(next/web): display ticket title in document title
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjdd committed Nov 13, 2023
1 parent 766946c commit c4b9a02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions next/web/src/App/Admin/Tickets/Ticket/TicketDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useMemo } from 'react';
import { useQueryClient } from 'react-query';
import { useTitle } from 'react-use';
import { useNavigate, useParams } from 'react-router-dom';
import { AiFillExclamationCircle, AiOutlineApi } from 'react-icons/ai';
import moment from 'moment';
Expand Down Expand Up @@ -61,6 +62,9 @@ export function TicketDetail() {
const navigate = useNavigate();

const { ticket, update, updating, refetch } = useMixedTicket(id);
useTitle(ticket ? ticket.title : 'Loading', {
restoreOnUnmount: true,
});

const { replies, fetchMoreReplies, refetchReples } = useTicketReplies(ticket?.id);
const { opsLogs, fetchMoreOpsLogs } = useTicketOpsLogs(ticket?.id);
Expand Down

0 comments on commit c4b9a02

Please sign in to comment.