diff --git a/client-solid/src/Components/NewPost.tsx b/client-solid/src/Components/NewPost.tsx index 0dbdbc2..0726537 100644 --- a/client-solid/src/Components/NewPost.tsx +++ b/client-solid/src/Components/NewPost.tsx @@ -8,7 +8,7 @@ export function NewPostInputArea(): JSXElement { const [content, setContent] = createSignal(""); const [waiting, setWaiting] = createSignal(false); - // We assumte this context is always available + // We assume this context is always available const login_ctx = useContext(LoginContext)!; const nav = useNavigate(); diff --git a/client-solid/src/Components/SinglePost.tsx b/client-solid/src/Components/SinglePost.tsx index 65c41dd..2dfd919 100644 --- a/client-solid/src/Components/SinglePost.tsx +++ b/client-solid/src/Components/SinglePost.tsx @@ -1,6 +1,6 @@ import { useParams } from "@solidjs/router"; -import { JSXElement, Show, Suspense, createResource } from "solid-js"; - +import { JSXElement, Show, Suspense, createResource, useContext } from "solid-js"; +import { LoginContext } from "../Context/GlobalState"; import { loadSpinner } from "../Util/Icons"; import { getPost } from "../Util/api"; import { CommentSection } from "./CommentSection"; @@ -10,12 +10,15 @@ import { NewCommentInputArea } from "./NewComment"; export function SinglePost(): JSXElement { const params = useParams(); const [post] = createResource(params.postid, getPost); + const login_ctx = useContext(LoginContext)!; // Assuming login context is always available return ( - + + +