diff --git a/src/App.jsx b/src/App.jsx new file mode 100644 index 0000000..982db1a --- /dev/null +++ b/src/App.jsx @@ -0,0 +1,73 @@ +import { Route, Router, Switch } from 'wouter-preact' + +import { + useHashLocation, + extractView, +} from './routing' +import { + useThemeEngine, +} from '~/src/themes/themes' + +import HomeView from '~/src/views/HomeView/HomeView' +import GamesView from '~/src/views/GamesView/GamesView' +import ThemesView from '~/src/views/ThemesView/ThemesView' +import PlayerView from '~/src/views/PlayerView/PlayerView' +import NotFoundView from '~/src/views/NotFoundView' + +export default function App () { + const themeEngine = useThemeEngine() + const [currentLocation] = useHashLocation() + + const playerView = (themeEngine, singleWindow) => + function view (params) { + return () + } + + return ( + +
+ + + + + + + + + + + + + + { playerView(themeEngine, false) } + + + { playerView(themeEngine, false) } + + + { playerView(themeEngine, true) } + + + { playerView(themeEngine, true) } + + + + + + + +
+
+ ) +} diff --git a/src/index.js b/src/index.js index 875239f..32d81a7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,79 +1,9 @@ -import { h, render } from 'preact' -import { Route, Router, Switch } from 'wouter-preact' - -import { - useHashLocation, - extractView, -} from './routing' -import { - useThemeEngine, -} from '~/src/themes/themes' - -import HomeView from '~/src/views/HomeView/HomeView' -import GamesView from '~/src/views/GamesView/GamesView' -import ThemesView from '~/src/views/ThemesView/ThemesView' -import PlayerView from '~/src/views/PlayerView/PlayerView' -import NotFoundView from '~/src/views/NotFoundView' +import { render } from 'preact' import '@fontsource/open-sans' + import '~/src/style/base.css' -function App () { - const themeEngine = useThemeEngine() - const [currentLocation] = useHashLocation() - - const playerView = (themeEngine, singleWindow) => - function view (params) { - return () - } - - return ( - -
- - - - - - - - - - - - - - { playerView(themeEngine, false) } - - - { playerView(themeEngine, false) } - - - { playerView(themeEngine, true) } - - - { playerView(themeEngine, true) } - - - - - - - -
-
- ) -} +import App from './App' render(, document.getElementById('root'))