Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Don’t return metadata if poll is deleted (#1603)
Luke Vellacf9ab1b26544
diff --git a/apps/web/src/app/[locale]/invite/[urlId]/layout.tsx b/apps/web/src/app/[locale]/invite/[urlId]/layout.tsxindex aae2796b0..2d3ca84cd 100644--- a/apps/web/src/app/[locale]/invite/[urlId]/layout.tsx+++ b/apps/web/src/app/[locale]/invite/[urlId]/layout.tsx@@ -20,7 +20,7 @@ export default async function Layout({trpc.polls.comments.list.prefetch({ pollId: params.urlId }),]);- if (!poll) {+ if (!poll || poll.deleted) {notFound();}diff --git a/apps/web/src/app/[locale]/invite/[urlId]/page.tsx b/apps/web/src/app/[locale]/invite/[urlId]/page.tsxindex a0aa064ed..22e77a084 100644--- a/apps/web/src/app/[locale]/invite/[urlId]/page.tsx+++ b/apps/web/src/app/[locale]/invite/[urlId]/page.tsx@@ -52,6 +52,7 @@ export async function generateMetadata({select: {id: true,title: true,+ deleted: true,user: {select: {name: true,@@ -62,7 +63,7 @@ export async function generateMetadata({const { t } = await getTranslation(locale);- if (!poll) {+ if (!poll || poll.deleted) {notFound();}