mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-22 21:53:46 +01:00
feat: use custom state manager
This commit is contained in:
1 parent
cf38cb3a6e
commit
87b6a36520
11 files changed
+84
-36
No files matched your search
@@ -26,7 +26,6 @@ export function Header({ index }: HeaderProps) {
|
||||
const rowStyle = tierListRows[index];
|
||||
const name = TierList.use((state) => state.rows[index].name);
|
||||
const input = useRef<HTMLInputElement>(null);
|
||||
const mutateTierList = TierList.useMutation();
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
return (
|
||||
@@ -67,9 +66,8 @@ export function Header({ index }: HeaderProps) {
|
||||
onBlur={() => {
|
||||
if (!input.current) return;
|
||||
|
||||
mutateTierList((draft) => {
|
||||
TierList.mutate((draft) => {
|
||||
if (!input.current) return;
|
||||
|
||||
draft.rows[index].name = input.current.value;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user