update: add zustand store and basic setup
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
"use client"
|
||||
import useSteamStore from "@/store/steam"
|
||||
|
||||
export default function Page() {
|
||||
const { dir, updateDir, csDir, updateCsDir, currentUser } = useSteamStore()
|
||||
return (
|
||||
<div
|
||||
className="bg-[#f1f0f2] h-screen w-full flex flex-col gap-6 items-center justify-center"
|
||||
@@ -6,6 +10,21 @@ export default function Page() {
|
||||
>
|
||||
<h1 className="text-4xl font-bold tracking-wide text-zinc-800">CS工具箱</h1>
|
||||
<p>准备环节</p>
|
||||
|
||||
<div className="flex flex-col w-full gap-6 p-5 border rounded-lg bg-white/40">
|
||||
<input
|
||||
className="px-2 py-1 rounded-lg"
|
||||
value={dir}
|
||||
onChange={(e) => updateDir(e.target.value)}
|
||||
/>
|
||||
<input
|
||||
className="px-2 py-1 rounded-lg"
|
||||
value={csDir}
|
||||
onChange={(e) => updateCsDir(e.target.value)}
|
||||
/>
|
||||
|
||||
<p>{currentUser().steamID64}</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user