FrostByte/client-solid/src/Primary.tsx

17 lines
525 B
TypeScript
Raw Normal View History

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-11-13 11:50:24 +01:00
import { NewPostInputArea } from "./NewPost";
2023-10-21 08:51:33 +02:00
// 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>
);
}