diff --git a/src/App.tsx b/src/App.tsx index 164190c..376f7b6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -36,13 +36,18 @@ const App: React.FC = () => { ); - // Some hacky uri decoding - location.href = decodeURIComponent(location.href); - const [hash, setHash] = useState(location.hash); console.log(hash); - useEffect(() => (window.onhashchange = () => setHash(location.hash)), []); + useEffect(() => { + // Some hacky uri decoding + if (location.href.split('/').length > 4) { + location.href = decodeURIComponent(location.href); + } + + window.onhashchange = () => setHash(location.hash); + console.log('why'); + }, []); if (hash) { if (hash.startsWith('#/')) {