Initial commit for wedding-planner MVP

This commit is contained in:
2025-06-23 10:20:37 -04:00
commit bbe5eb0ccd
37 changed files with 5650 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
'use client'
import { useState } from "react"
export default function CreateEventForm() {
const [name, setName] = useState('');
async function handleSubmit(e: React.FormEvent) {
e.preventDefault()
const res = await fetch('api/events', {
method: 'POST',
body: JSON.stringify({ name }),
});
const event = await res.json();
console.log('Created:', event);
};
return (
<form onSubmit={handleSubmit}>
<input
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="Event Name"
/>
<button type="submit">Create</button>
</form>
)
}