From b7c37574f4f90fc346bc51dd06c77c8958570b33 Mon Sep 17 00:00:00 2001 From: Stanisław Zagórowski Date: Wed, 30 Aug 2023 18:00:11 +0200 Subject: all: move front into its own directory --- front/src/app.tsx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 front/src/app.tsx (limited to 'front/src/app.tsx') diff --git a/front/src/app.tsx b/front/src/app.tsx new file mode 100644 index 0000000..5ba8e6f --- /dev/null +++ b/front/src/app.tsx @@ -0,0 +1,34 @@ +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 ( + <> + +
+ + + + + + +
+ + ) +} -- cgit v1.3.1