Skip to content

Commit

Permalink
Add fallback for navigation in Vote component using window.location.href
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanGrims committed Dec 10, 2024
1 parent d1cadf7 commit 282d63d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Vote.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ export default function Vote() {
if (localStorage.getItem(id) && !urlParams.get("preview")) {
if (urlParams.get("allowResubmission")) {
navigate(`/x/${id}?allowResubmission=true`);
window.location.href = `/x/${id}?allowResubmission=true`;
return;
}
navigate(`/x/${id}`);
window.location.href = `/x/${id}`;
}

if ((active === false || Date.now() > endTime.seconds * 1000) && !preview) {
Expand Down

0 comments on commit 282d63d

Please sign in to comment.