diff --git a/src/index.js b/src/index.js index 4055d4a..30fc502 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ import { h, render } from 'preact' -import { Route, Router, Switch } from 'wouter-preact' +import { Route, Router, Redirect, Switch } from 'wouter-preact' import { useHashLocation, @@ -40,6 +40,10 @@ function App () { ...params }} />} + + + {params => { const handler = () => setLoc(currentLoc()) window.addEventListener('hashchange', handler) + handler() return () => window.removeEventListener('hashchange', handler) }, []) diff --git a/src/views/HomeView.jsx b/src/views/HomeView.jsx index d8b03b7..2117d0e 100644 --- a/src/views/HomeView.jsx +++ b/src/views/HomeView.jsx @@ -64,7 +64,7 @@ export default function ({ themeEngine }) {

- + IFDB games