Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
💬 Update messaging when access to poll is denied
Luke Vellabbd14daeab5e
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.jsonindex b21d1ad9d..bc983293b 100644--- a/apps/web/public/locales/en/app.json+++ b/apps/web/public/locales/en/app.json@@ -152,8 +152,7 @@"finalize": "Finalize","allDay": "All day","permissionDenied": "Unauthorized",- "permissionDeniedDescription": "Log in to view this poll.",- "goToHome": "Go to polls",+ "permissionDeniedDescription": "If you are the poll creator, please login to access your poll","loginDifferent": "Switch user","differentOwner": "Different Owner","differentOwnerDescription": "This poll was created by a different user. Would you like to transfer ownership to the current user?",@@ -171,5 +170,7 @@"notificationsGuestTooltip": "Create an account or login to turn get notifications","planFree": "Free","dateAndTimeDescription": "Change your preferred date and time settings",- "createdTime": "Created {relativeTime}"+ "createdTime": "Created {relativeTime}",+ "permissionDeniedParticipant": "If you are not the poll creator, you should go to the Invite Page.",+ "goToInvite": "Go to Invite Page"}diff --git a/apps/web/src/components/layouts/poll-layout.tsx b/apps/web/src/components/layouts/poll-layout.tsxindex c3b6e5580..e86b14b84 100644--- a/apps/web/src/components/layouts/poll-layout.tsx+++ b/apps/web/src/components/layouts/poll-layout.tsx@@ -1,6 +1,7 @@import { trpc } from "@rallly/backend";import {ArrowLeftIcon,+ ArrowUpRight,CheckCircleIcon,ChevronDownIcon,FileBarChart,@@ -212,7 +213,16 @@ export const PermissionGuard = ({ children }: React.PropsWithChildren) => {<PageDialogDescription><Transi18nKey="permissionDeniedDescription"- defaults="Log in to view this poll."+ defaults="If you are the poll creator, please login to administor your poll."+ />+ </PageDialogDescription>+ <PageDialogDescription>+ <Trans+ i18nKey="permissionDeniedParticipant"+ defaults="If you are not the poll creator, you should go to the Invite Page."+ components={{+ a: <Link className="text-link" href={`/invite/${poll.id}`} />,+ }}/></PageDialogDescription></PageDialogHeader>@@ -233,8 +243,9 @@ export const PermissionGuard = ({ children }: React.PropsWithChildren) => {</Button>)}<Button asChild size="lg">- <Link href="/polls">- <Trans i18nKey="goToHome" defaults="Go to polls" />+ <Link href={`/invite/${poll.id}`}>+ <Trans i18nKey="goToInvite" defaults="Go to Invite Page" />+ <ArrowUpRight className="h-4 w-4" /></Link></Button></PageDialogFooter>