Skip to content

Commit

Permalink
feat: add simple send gift
Browse files Browse the repository at this point in the history
  • Loading branch information
soyricardodev committed Jun 29, 2024
1 parent 7ea9758 commit dcd3733
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ import {
import { Button } from "@theliaison/ui/button";

export function SimpleSendGift() {
const [recipientName, setRecipientName] = useState("");
const [contactInfo, setContactInfo] = useState("");

function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();
console.log("submit");
}

return (
<Card className="mx-auto max-w-md">
<CardHeader>
Expand All @@ -33,7 +41,13 @@ export function SimpleSendGift() {
<form className="space-y-4">
<div className="grid gap-2">
<Label htmlFor="recipient-name">Recipient's Name</Label>
<Input id="recipient-name" placeholder="Enter recipient's name" />
<Input
id="recipient-name"
placeholder="Enter recipient's name"
name="recipient-name"
value={recipientName}
onChange={(e) => setRecipientName(e.target.value)}
/>
</div>
<div className="grid gap-2">
<Label htmlFor="contact-method">Contact Method</Label>
Expand Down Expand Up @@ -104,7 +118,13 @@ export function SimpleSendGift() {
maxLength={15}
/>
</div> */}
<Input id="contact-info" placeholder="[email protected]" />
<Input
id="contact-info"
placeholder="[email protected]"
name="contact-info"
value={contactInfo}
onChange={(e) => setContactInfo(e.target.value)}
/>
</div>
<Button type="submit" className="w-full">
Send Gift
Expand Down
9 changes: 7 additions & 2 deletions apps/gifting-concierge/src/app/send/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { Header } from "~/components/header";
import { SimpleSendGift } from "../components/gift/simple-send-gift";

export default function SendPage() {
return (
<div className="w-full mx-auto my-12">
<SimpleSendGift />
<div className="w-full mx-auto max-w-screen-2xl px-12">
<Header />

<main className="py-20">
<SimpleSendGift />
</main>
</div>
);
}

0 comments on commit dcd3733

Please sign in to comment.