32 lines
795 B
TypeScript
32 lines
795 B
TypeScript
import { Router, Route, Switch } from "wouter-preact";
|
|
|
|
import PostPage from "$pages/blog/post";
|
|
import HomeTimeline from "$pages/timeline/home";
|
|
|
|
export default function AppRouter() {
|
|
return (
|
|
<>
|
|
<Router base="/web">
|
|
<Switch>
|
|
{/* Posts */}
|
|
<Route path="/@:username/posts/:postId">
|
|
<PostPage />
|
|
</Route>
|
|
|
|
{/* User timelines */}
|
|
<Route path="/@:username/with_replies">Replies!</Route>
|
|
<Route path="/@:username/media">Media!</Route>
|
|
<Route path="/@:username">User!</Route>
|
|
|
|
{/* Home */}
|
|
<Route path="/local">Local timeline</Route>
|
|
<Route path="/global">Global timeline</Route>
|
|
<Route path="/notifications">Notifications</Route>
|
|
<Route path="/">
|
|
<HomeTimeline />
|
|
</Route>
|
|
</Switch>
|
|
</Router>
|
|
</>
|
|
);
|
|
}
|