mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: edit headers
This commit is contained in:
1 parent
53d811eeef
commit
5f256ed84d
10 files changed
+155
-50
No files matched your search
@@ -6,7 +6,7 @@ import { TierList } from '../../stores/tierList';
|
||||
const tankDefinitions = await fetchTankDefinitions();
|
||||
|
||||
export function URLManager() {
|
||||
const tanks = TierList.use((state) => state.tanks);
|
||||
const rows = TierList.use((state) => state.rows);
|
||||
const mutateTierList = TierList.useMutation();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -21,15 +21,15 @@ export function URLManager() {
|
||||
.filter((id) => id in tankDefinitions.tanks);
|
||||
|
||||
mutateTierList((draft) => {
|
||||
draft.tanks[index] = values;
|
||||
draft.rows[index].tanks = values;
|
||||
});
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
window.history.replaceState(null, '', `?${generateTierListParams(tanks)}`);
|
||||
}, [tanks]);
|
||||
window.history.replaceState(null, '', `?${generateTierListParams(rows)}`);
|
||||
}, [rows]);
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in new issue
Block a user