Skip to content

Commit

Permalink
update UI
Browse files Browse the repository at this point in the history
  • Loading branch information
susumutomita committed May 21, 2024
1 parent 4145337 commit e5e9246
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
2 changes: 0 additions & 2 deletions __test__/example.http
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

GET http://localhost:3000/api/health HTTP/1.1



###

GET http://localhost:3000/api/users HTTP/1.1
Expand Down
42 changes: 32 additions & 10 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,52 @@ const Home: NextPage = () => {
};

return (
<div>
<form onSubmit={handleSubmit}>
<div>
<label htmlFor="title">Title:</label>
<div className="container mx-auto p-4">
<h1 className="text-4xl font-bold text-center mb-8">Create a New Post</h1>
<form
onSubmit={handleSubmit}
className="max-w-lg mx-auto bg-white p-6 rounded-lg shadow-md"
>
<div className="mb-4">
<label htmlFor="title" className="block text-gray-700 font-bold mb-2">
Title:
</label>
<input
type="text"
id="title"
className="input input-bordered w-full"
value={title}
onChange={e => setTitle(e.target.value)}
/>
</div>
<div>
<label htmlFor="content">Content:</label>
<div className="mb-4">
<label
htmlFor="content"
className="block text-gray-700 font-bold mb-2"
>
Content:
</label>
<textarea
id="content"
className="textarea textarea-bordered w-full"
value={content}
onChange={e => setContent(e.target.value)}
/>
</div>
<button type="submit">Submit</button>
<div className="text-center">
<button type="submit" className="btn btn-primary">
Submit
</button>
</div>
</form>
<Link href="/users">Create User</Link>
<br />
<Link href="/api-docs">API Documentation</Link>
<div className="text-center mt-8">
<Link href="/users" className="btn btn-secondary mr-4">
Create User
</Link>
<Link href="/api-docs" className="btn btn-secondary">
API Documentation
</Link>
</div>
</div>
);
};
Expand Down

0 comments on commit e5e9246

Please sign in to comment.