diff options
| author | Stanisław Zagórowski <hasohasacz@gmail.com> | 2023-08-30 18:00:11 +0200 |
|---|---|---|
| committer | Stanisław Zagórowski <hasohasacz@gmail.com> | 2023-08-30 18:00:11 +0200 |
| commit | b7c37574f4f90fc346bc51dd06c77c8958570b33 (patch) | |
| tree | 72895a18a8d72ecd35bf9b71030d6bf40ae34167 /src/app.tsx | |
| parent | b661407d801c8ccaa7773ae30f0fc26a1d70ffff (diff) | |
all: move front into its own directory
Diffstat (limited to 'src/app.tsx')
| -rw-r--r-- | src/app.tsx | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/app.tsx b/src/app.tsx deleted file mode 100644 index 5ba8e6f..0000000 --- a/src/app.tsx +++ /dev/null @@ -1,34 +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'; - -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 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> - </div> - </> - ) -} |
