diff --git a/src/App.tsx b/src/App.tsx index 1b2513b..63d81db 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -103,7 +103,7 @@ export default function App() { return false; }); return isLoggedIn; - }, [userState]); + }, [userState.isLoggedIn]); useEffect(() => { console.log("User state changed"); diff --git a/src/pages/ModerationPage.tsx b/src/pages/ModerationPage.tsx index 3370924..603005f 100644 --- a/src/pages/ModerationPage.tsx +++ b/src/pages/ModerationPage.tsx @@ -57,6 +57,8 @@ export default function ImageModerationPage() { }); setTickets(updatedTickets); + console.log(updatedTickets); + setIsLoading(false); } catch (err) { console.error(err) @@ -65,6 +67,23 @@ export default function ImageModerationPage() { fetchTickets() }, [currentPage]) + if (Tickets.length === 0 || Tickets === undefined || Tickets === null) { + return ( + <> + + + Ticket Moderation + + + + + No tickets to moderate + + + + ) + } + return ( <>