feat: invitation deletion
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Link from "next/link"
|
||||
|
||||
import { CopyInviteButton } from "@/components/admin/copy-invite-button"
|
||||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import {
|
||||
@@ -33,7 +34,12 @@ function getStatusVariant(status: string): "default" | "secondary" | "outline" {
|
||||
return "outline"
|
||||
}
|
||||
|
||||
export default async function GuestsPage() {
|
||||
export default async function GuestsPage({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Promise<{ deleted?: string }>
|
||||
}) {
|
||||
const { deleted } = await searchParams
|
||||
const invitations = await listInvitations()
|
||||
|
||||
return (
|
||||
@@ -50,6 +56,15 @@ export default async function GuestsPage() {
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{deleted ? (
|
||||
<Alert>
|
||||
<AlertTitle>Guest group deleted</AlertTitle>
|
||||
<AlertDescription>
|
||||
The invitation and its associated guest information were permanently removed.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
) : null}
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Invitation list</CardTitle>
|
||||
|
||||
Reference in New Issue
Block a user