Solved a problem with the record page not being able to reload

This commit is contained in:
Tiago Ribeiro
2024-03-28 12:28:24 +00:00
parent 2657cb409c
commit b64593df90
3 changed files with 34 additions and 27 deletions

View File

@@ -31,6 +31,8 @@ export default function Navbar({user, path, navDisabled = false, focusMode = fal
const [disablePaymentPage, setDisablePaymentPage] = useState(true);
const [isTicketOpen, setIsTicketOpen] = useState(false);
const router = useRouter();
const disableNavigation = preventNavigation(navDisabled, focusMode);
const expirationDateColor = (date: Date) => {
@@ -59,7 +61,7 @@ export default function Navbar({user, path, navDisabled = false, focusMode = fal
return (
<>
<Modal isOpen={isTicketOpen} onClose={() => setIsTicketOpen(false)} title="Submit a ticket">
<TicketSubmission user={user} page={window.location.href} onClose={() => setIsTicketOpen(false)} />
<TicketSubmission user={user} page={router.asPath} onClose={() => setIsTicketOpen(false)} />
</Modal>
{user && (