2023-10-21 08:51:33 +02:00
|
|
|
import { Route, Routes } from "@solidjs/router";
|
|
|
|
import { Posts } from "./Posts";
|
2023-10-27 16:04:58 +02:00
|
|
|
import { SinglePost } from "./SinglePost";
|
2023-10-21 08:51:33 +02:00
|
|
|
import { NewPostInputArea } from "./Root";
|
|
|
|
|
|
|
|
// Primary is the section of the page that holds the main content
|
|
|
|
export function Primary() {
|
|
|
|
return (
|
|
|
|
<Routes>
|
|
|
|
<Route path="/" element={<Posts />} />
|
2023-10-27 16:04:58 +02:00
|
|
|
<Route path="/post/:postid" element={<SinglePost />} />
|
2023-10-21 08:51:33 +02:00
|
|
|
<Route path="/new" element={<NewPostInputArea />} />
|
2023-10-27 16:04:58 +02:00
|
|
|
<Route path="*" element={<h1>404</h1>} />
|
2023-10-21 08:51:33 +02:00
|
|
|
</Routes>
|
|
|
|
);
|
|
|
|
}
|