From 867f7247c3b90b1c57b1854abe7597e38b1cf1fb Mon Sep 17 00:00:00 2001 From: Robin Mulder Date: Fri, 22 Nov 2019 12:04:09 +0100 Subject: [PATCH] fix: decode hash --- src/App.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 3607c89..ee28f59 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -24,7 +24,7 @@ function App(): JSX.Element { const [prefabs, setPrefabs] = useState({} as Record); const [names, setNames] = useState([] as string[]); const history = useHistory(); - const currentPath = history.location.hash.replace('#/', ''); + const currentPath = decodeURI(history.location.hash.replace('#/', '')); const classes: Record = useStyles(); const selectedPrefab = prefabs[currentPath]; @@ -47,9 +47,9 @@ function App(): JSX.Element {