initial find & create game functionality

and restructure homepage components
This commit is contained in:
Nathaniel Tampus
2023-03-04 18:43:32 +08:00
parent 6de9943dca
commit dd0a097a48
4 changed files with 116 additions and 28 deletions

View File

@@ -1,4 +1,6 @@
import PublicGames from "@/components/PublicGames";
import PublicGames from "@/components/home/PublicGames";
import JoinGame from "@/components/home/JoinGame";
import CreateGame from "@/components/home/CreateGame";
export default function Home() {
return (
@@ -8,39 +10,14 @@ export default function Home() {
<div className="flex flex-col items-center gap-4">
<div className="flex flex-col items-center">
<h2 className="mb-4 text-xl font-bold leading-tight">Join from invite</h2>
<div className="form-control">
<div className="input-group">
<input
type="text"
placeholder="Invite link or code"
className="input input-bordered"
/>
<button className="btn btn-square">Join</button>
</div>
</div>
<JoinGame />
</div>
<div className="divider divider-vertical">or</div>
<div className="flex flex-col items-center">
<h2 className="mb-4 text-xl font-bold leading-tight">Create game</h2>
<div className="form-control">
<label className="label cursor-pointer">
<span className="label-text">Unlisted/invite-only</span>
<input type="checkbox" className="checkbox" />
</label>
<label className="label">
<span className="label-text">Select your side</span>
</label>
<div className="input-group">
<select className="select select-bordered">
<option value="random">Random</option>
<option value="white">White</option>
<option value="black">Black</option>
</select>
<button className="btn">Create</button>
</div>
</div>
<CreateGame />
</div>
</div>
</div>