Skip to content

Commit

Permalink
fix: add sender_id and recipient_id in the db query
Browse files Browse the repository at this point in the history
  • Loading branch information
soyricardodev committed Jun 30, 2024
1 parent 7fc1d2a commit e41ed14
Showing 1 changed file with 14 additions and 40 deletions.
54 changes: 14 additions & 40 deletions apps/gifting-concierge/src/app/confirm/[giftId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import { Button } from "@theliaison/ui/button";
import Image from "next/image";
import Link from "next/link";
import { createClient } from "~/supabase/server";
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@theliaison/ui/dialog";
import { ConfirmGift } from "./confirm-gift";
import { ChevronRightIcon } from "lucide-react";
import ShippingForm from "./details/shipping-form";
Expand All @@ -24,7 +15,7 @@ export default async function Confirm({

const { data, error } = await supabase
.from("gifts")
.select("id")
.select("id, recipient_id, sender_id")
.eq("id", giftId)
.single();

Expand All @@ -50,47 +41,30 @@ export default async function Confirm({
<p className="mt-6 text-center text-lg leading-6 text-gray-200">
The Liaison Gifting concierge manages the gift sending.
</p>
<div className="w-full mx-auto flex items-center justify-center gap-6 mt-12">
<ConfirmGift>
<ShippingForm
hideTitle
giftId={data.id}
recipientId={data.recipient_id}
senderId={data.sender_id}
/>
</ConfirmGift>
{/*<Dialog className="dark">
<DialogTrigger asChild>
</DialogTrigger>
<DialogContent className="sm:max-w-[600px]">
<DialogHeader>
<DialogTitle>Get Shipping Details</DialogTitle>
<DialogDescription>
Please provide your shipping details. Click confirm when
you're done.
</DialogDescription>
</DialogHeader>
<div className="w-full mx-auto flex items-center justify-center gap-6 mt-12">
<ConfirmGift>
<ShippingForm
hideTitle
giftId={data.id}
recipientId={data.recipient_id}
senderId={data.sender_id}
/>
</DialogContent>
</Dialog>*/}
<Link href="/faq" className="text-white hover:text-[#DBD0C5] transition-colors text-sm flex gap-0.5 group">
What is The Liaison

<ChevronRightIcon className="size-5 text-[#DBD0C5] opacity-0 group-hover:opacity-100 transition-opacity" />
</Link>
</div>
</ConfirmGift>
<Link
href="/faq"
className="text-white hover:text-[#DBD0C5] transition-colors text-sm flex gap-0.5 group"
>
What is The Liaison
<ChevronRightIcon className="size-5 text-[#DBD0C5] opacity-0 group-hover:opacity-100 transition-opacity" />
</Link>
</div>
</div>
<Image
src={giftboxGIF}
alt="Giftbox"
className="mx-auto w-full max-w-xl lg:order-last hover:scale-105 transition-all hover:[filter:drop-shadow(0_0_8px_#f0f0f0)]"
/>
</section>
</div>
</section>
</div>
);
}

0 comments on commit e41ed14

Please sign in to comment.