Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Fix invite link

Luke Vella5363e66a06ac
diff --git a/apps/web/src/features/poll/components/polls-infinite-list.tsx b/apps/web/src/features/poll/components/polls-infinite-list.tsx
index f40bf3caa..b0315d404 100644
--- a/apps/web/src/features/poll/components/polls-infinite-list.tsx
+++ b/apps/web/src/features/poll/components/polls-infinite-list.tsx
@@ -101,7 +101,7 @@ export function PollsInfiniteList({
name: participant.name,
image: participant.image,
}))}
- inviteLink={`/invite/${poll.id}`}
+ inviteLink={poll.inviteLink}
pollLink={`/poll/${poll.id}`}
createdBy={
poll.user
diff --git a/apps/web/src/features/poll/data.ts b/apps/web/src/features/poll/data.ts
index 05425d185..5761a3043 100644
--- a/apps/web/src/features/poll/data.ts
+++ b/apps/web/src/features/poll/data.ts
@@ -1,5 +1,6 @@
import type { PollStatus, Prisma } from "@rallly/database";
import { prisma } from "@rallly/database";
+import { absoluteUrl } from "@rallly/utils/absolute-url";
import { requireSpace } from "@/auth/data";
type PollFilters = {
@@ -85,6 +86,7 @@ export const getPolls = async ({
name: participant.name,
image: participant.user?.image ?? undefined,
})),
+ inviteLink: absoluteUrl(`/invite/${poll.id}`),
}));
const totalPages = Math.ceil(totalCount / pageSize);