How did this ever work...

This commit is contained in:
Will Scullin 2022-05-30 21:01:38 -07:00
parent d63fead90a
commit 84e73d0fbc
No known key found for this signature in database
GPG Key ID: 26DCD1042C6638CD
2 changed files with 2 additions and 2 deletions

View File

@ -58,8 +58,8 @@ export const DiskII = ({ disk2, number, on, name, side }: DiskIIProps) => {
const filename = `/json/disks/${hashPart}.json`;
loadJSON(disk2, number, filename)
.catch((e) => setError(e.message));
setCurrentHash(hashPart);
}
setCurrentHash(hashPart);
}
}
}, [currentHash, disk2, hash, number]);

View File

@ -1,7 +1,7 @@
import { useEffect, useState } from 'preact/hooks';
export const useHash = () => {
const [hash, setHash] = useState(window.location.pathname);
const [hash, setHash] = useState(window.location.hash);
const popstateListener = () => {
const hash = window.location.hash;