Add redirect for GameView

This commit is contained in:
He4eT 2021-03-04 03:17:37 +05:00
commit 2a909c1f19
3 changed files with 7 additions and 2 deletions

View file

@ -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
}} />}
</Route>
<Route path='/games'>
<Redirect
to={`/games/${themeEngine.currentTheme}/`} />
</Route>
<Route path='/play/:theme/:encodedUrl'>
{params => <PlayerView {...{
...themeEngine,