mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
Projects (#192)
* Add file save UI and drafts project * Fix build * Create SearchList component as abstraction * Add project page and file tree view * Create Locale context * Create Theme context * Create Version context * Create Title context * Create Project context * Store current file in project context * Fix issues when renaming file and implement deleting * Style improvements * Make all project strings translatable * Fix z-index
This commit is contained in:
28
src/app/App.tsx
Normal file
28
src/app/App.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { RouterOnChangeArgs } from 'preact-router'
|
||||
import { Router } from 'preact-router'
|
||||
import '../styles/global.css'
|
||||
import '../styles/nodes.css'
|
||||
import { Analytics } from './Analytics'
|
||||
import { Header } from './components'
|
||||
import { Category, Changelog, Generator, Home, Project, Sounds } from './pages'
|
||||
import { cleanUrl } from './Utils'
|
||||
|
||||
export function App() {
|
||||
const changeRoute = (e: RouterOnChangeArgs) => {
|
||||
// Needs a timeout to ensure the title is set correctly
|
||||
setTimeout(() => Analytics.pageview(cleanUrl(e.url)))
|
||||
}
|
||||
|
||||
return <>
|
||||
<Header />
|
||||
<Router onChange={changeRoute}>
|
||||
<Home path="/" />
|
||||
<Category path="/worldgen" category="worldgen" />
|
||||
<Category path="/assets" category="assets" />
|
||||
<Sounds path="/sounds" />
|
||||
<Changelog path="/changelog" />
|
||||
<Project path="/project" />
|
||||
<Generator default />
|
||||
</Router>
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user