17 lines
576 B
TypeScript
17 lines
576 B
TypeScript
import { Route, Routes } from "@solidjs/router";
|
|
import { Posts } from "./Posts";
|
|
import { SinglePost } from "./SinglePost";
|
|
import { NewPostInputArea } from "./NewPost";
|
|
import { JSXElement } from "solid-js";
|
|
|
|
// Primary is the section of the page that holds the main content
|
|
export function Primary(): JSXElement {
|
|
return (
|
|
<Routes>
|
|
<Route path="/" element={<Posts />} />
|
|
<Route path="/post/:postid" element={<SinglePost />} />
|
|
<Route path="/new" element={<NewPostInputArea />} />
|
|
<Route path="*" element={<h1>404</h1>} />
|
|
</Routes>
|
|
);
|
|
}
|