diff --git a/apps/link/app/(main)/_components/Sidebar.tsx b/apps/link/app/(main)/_components/Sidebar.tsx index f25ca14..c8c546e 100644 --- a/apps/link/app/(main)/_components/Sidebar.tsx +++ b/apps/link/app/(main)/_components/Sidebar.tsx @@ -151,7 +151,7 @@ const MenuItem = ({ } /> )} - {badge && badge > 0 ? ( + {open && badge && badge > 0 ? ( = ({ useEffect(() => { const fetchCounts = async () => { const counts = await getOverviewTicketCountsAction(); - console.log({ counts }); setOverviewCounts(counts); }; @@ -422,8 +421,9 @@ export const Sidebar: FC = ({ /> = ({ /> )} = ({ open={open} /> = ({ open={open} /> = ({ name }) => { fetchTickets(); - const interval = setInterval(fetchTickets, 20000); + const interval = setInterval(fetchTickets, 10000); return () => clearInterval(interval); }, [name]); diff --git a/apps/link/app/(main)/tickets/[id]/@detail/_components/TicketDetail.tsx b/apps/link/app/(main)/tickets/[id]/@detail/_components/TicketDetail.tsx index cb42fa3..bc6f6b7 100644 --- a/apps/link/app/(main)/tickets/[id]/@detail/_components/TicketDetail.tsx +++ b/apps/link/app/(main)/tickets/[id]/@detail/_components/TicketDetail.tsx @@ -61,113 +61,115 @@ export const TicketDetail: FC = ({ id }) => { const shouldRender = !!ticket && !!ticketArticles; return ( - shouldRender && ( - - - - - - - + {shouldRender && ( + <> + + + + + - {ticket.title} - - + {ticket.title} + + {`Ticket #${ticket.number} (created ${new Date( + ticket.createdAt, + ).toLocaleDateString()})`} + + + + + {ticketArticles.edges.map(({ node: article }: any) => ( + {`Ticket #${ticket.number} (created ${new Date( - ticket.createdAt, - ).toLocaleDateString()})`} - - - - - {ticketArticles.edges.map(({ node: article }: any) => ( - - ))} - - - - + ))} + + + - -