diff --git a/frontend/src/app/(public)/invite/[slug]/page.tsx b/frontend/src/app/(public)/invite/[slug]/page.tsx
index e08a3b3..2956f72 100644
--- a/frontend/src/app/(public)/invite/[slug]/page.tsx
+++ b/frontend/src/app/(public)/invite/[slug]/page.tsx
@@ -17,8 +17,6 @@ import { getServerFileUrl } from "@/lib/utils";
const InvitationPage = () => {
const { slug } = useParams<{ slug: string }>();
const { event, fetchEventBySlug, isLoadingEvent, eventError } = useEvents();
- const [isLoading, setIsLoading] = useState(true);
- const [notFound, setNotFound] = useState(false);
const [showRSVP, setShowRSVP] = useState(false);
const { themes, isLoadingThemes } = useEventThemes();
const guestId = "current-guest-id-placeholder";
diff --git a/frontend/src/components/guests/guests-list.tsx b/frontend/src/components/guests/guests-list.tsx
index bc35a28..405d6be 100644
--- a/frontend/src/components/guests/guests-list.tsx
+++ b/frontend/src/components/guests/guests-list.tsx
@@ -65,6 +65,7 @@ import {
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
import { useAuth } from "@/context/auth-context";
+import { generateInviteLink } from "@/lib/utils";
// Helper to generate a random invitation code
const generateInvitationCode = (fullName: string): string => {
@@ -272,9 +273,9 @@ const GuestListTable = ({ event }: GuestListTableProps) => {
};
// Copy invitation code to clipboard
- const copyToClipboard = (text: string) => {
+ const copyToClipboard = (text: string, message: string) => {
navigator.clipboard.writeText(text);
- toast("Invitation code copied to clipboard");
+ toast(message);
};
// Export guest list to CSV
@@ -553,7 +554,12 @@ const GuestListTable = ({ event }: GuestListTableProps) => {
variant="ghost"
size="icon"
className="h-6 w-6"
- onClick={() => copyToClipboard(guest.invitation_code)}
+ onClick={() =>
+ copyToClipboard(
+ guest.invitation_code,
+ "Invitation code copied to clipboard",
+ )
+ }
>
@@ -575,10 +581,28 @@ const GuestListTable = ({ event }: GuestListTableProps) => {
Edit
copyToClipboard(guest.invitation_code)}
+ onClick={() =>
+ copyToClipboard(
+ guest.invitation_code,
+ "Invitation code copied to clipboard",
+ )
+ }
>
Copy Invitation Code
+
+ copyToClipboard(
+ generateInviteLink(
+ event.slug,
+ guest.invitation_code,
+ ),
+ "Invitation link copied to clipboard",
+ )
+ }
+ >
+ Copy Invitation Link
+
Resend Invitation