Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Fix invalid query calls when navigating away from poll
Luke Vellac58c814786aa
diff --git a/apps/web/src/components/layouts/poll-layout.tsx b/apps/web/src/components/layouts/poll-layout.tsxindex 35aad1206..2ec41264f 100644--- a/apps/web/src/components/layouts/poll-layout.tsx+++ b/apps/web/src/components/layouts/poll-layout.tsx@@ -287,6 +287,15 @@ const Prefetch = ({ children }: React.PropsWithChildren) => {};const PollLayout = ({ children }: React.PropsWithChildren) => {+ const router = useRouter();++ const urlId = router.query.urlId as string;++ if (!urlId) {+ // probably navigating away+ return null;+ }+return (<Prefetch><LegacyPollContextProvider>