- );
-}
diff --git a/client-solid/src/Primary.tsx b/client-solid/src/Primary.tsx
deleted file mode 100644
index 13d0eae..0000000
--- a/client-solid/src/Primary.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Route, Routes } from "@solidjs/router";
-import { Posts } from "./Posts";
-import { SinglePost } from "./SinglePost";
-import { NewPostInputArea } from "./Root";
-
-// Primary is the section of the page that holds the main content
-export function Primary() {
- return (
-
- } />
- } />
- } />
- 404} />
-
- );
-}
diff --git a/client-solid/src/Root.tsx b/client-solid/src/Root.tsx
index ef7aaa7..254424a 100644
--- a/client-solid/src/Root.tsx
+++ b/client-solid/src/Root.tsx
@@ -1,111 +1,143 @@
-import { Accessor, Show, createSignal, useContext } from "solid-js";
+import { createSignal } from "solid-js";
import { createContext } from "solid-js";
-import { createPost } from "./api";
-import { NewPost } from "./api";
-import { Navbar } from "./Navbar";
-import { Primary } from "./Primary";
-import { Login } from "./Navbar";
-import { useNavigate } from "@solidjs/router";
+import { Route, Routes, A } from "@solidjs/router";
-// Representing the state of varoious modals.
-// So far we only have one modal, but we can add more later
-// by adding more fields to this interface, or maybe an enum
-interface ModalContextType {
- loginModalOpen: Accessor;
- setLoginModalOpen: (value: boolean) => void;
-}
+import { createPost, getPosts } from "./api";
+import { Post, NewPost } from "./api";
-interface LoginContextType {
- token: Accessor;
- setToken: (value: string) => void;
- username: Accessor;
- setUsername: (value: string) => void;
-}
-
-// It is unclear to me if this is the idiomatic way to do this in Solid
-export const ModalContext = createContext();
-export const LoginContext = createContext();
+export const TestContext = createContext("Test123");
function Root() {
- // All of these are passed into context providers
- const [loginModalOpen, setLoginModalOpen] = createSignal(false);
- const [token, setToken] = createSignal("");
- const [username, setUsername] = createSignal("");
-
- // This may not be the best place to do this.
- localStorage.getItem("token") && setToken(localStorage.getItem("token")!);
- localStorage.getItem("username") &&
- setUsername(localStorage.getItem("username")!);
-
return (
<>
-
-
-