diff options
| author | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-12 23:24:47 +0100 |
|---|---|---|
| committer | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-12 23:24:47 +0100 |
| commit | 6b068ccd9156de8515203d0000c3a2a8ecb9c5fb (patch) | |
| tree | 1bd9fd29b5fbe053bc376bf667d294460846a59e /front/src/app.tsx | |
| parent | 329193f0d1c8d710cb7f63e61b19e574dfdde4c4 (diff) | |
luax: just reluax
Diffstat (limited to 'front/src/app.tsx')
| -rw-r--r-- | front/src/app.tsx | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/front/src/app.tsx b/front/src/app.tsx deleted file mode 100644 index ba081c9..0000000 --- a/front/src/app.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import './app.css' -import { Navbar } from './components/navbar' -import Contact from './pages/contact'; -import Games from './pages/games'; -import Home from './pages/home' -import { Router, Route, CustomHistory } from 'preact-router'; -import Projects from './pages/projects'; -import { HashHistory, createHashHistory } from 'history'; -import { AnimatedBg } from './components/animated_bg'; - -const hashHistoryAdapter = (hashHistory: HashHistory): CustomHistory => { - return { - listen: (callback) => hashHistory.listen(({ location }) => callback(location)), - location: hashHistory.location, - push: hashHistory.push, - replace: hashHistory.replace - }; -}; -export function App() { - const history = hashHistoryAdapter(createHashHistory()); - - return ( - <> - <Navbar /> - <div class="back-shadows"></div> - <div id="app-main"> - <Router history={history}> - <Route path="/" component={Home} /> - <Route path="/contact" component={Contact} /> - <Route path="/games" component={Games} /> - <Route path="/projects" component={Projects} /> - </Router> - <AnimatedBg /> - </div> - </> - ) -} |
