update: add zustand store and basic setup

This commit is contained in:
purp1e
2024-09-21 02:25:23 +08:00
parent 6625e0c57d
commit b3973fd101
10 changed files with 202 additions and 1 deletions

View File

@@ -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>
)
}