mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
How did this ever work...
This commit is contained in:
parent
d63fead90a
commit
84e73d0fbc
|
@ -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]);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user