diff --git a/client-solid/src/Components/Buttons/CommentsButton.tsx b/client-solid/src/Components/Buttons/CommentsButton.tsx deleted file mode 100644 index 700c7b0..0000000 --- a/client-solid/src/Components/Buttons/CommentsButton.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { JSXElement } from "solid-js"; - -import { CommentsIcon } from "../../Util/Icons"; -import { Post } from "../../Util/api"; - -export default function CommentsBUtton({ post }: { post: Post }): JSXElement { - return ( - <> -
- - -

{post.comments}

-
-
- - ); -} diff --git a/client-solid/src/Components/Buttons/Replies.tsx b/client-solid/src/Components/Buttons/Replies.tsx new file mode 100644 index 0000000..fe702e8 --- /dev/null +++ b/client-solid/src/Components/Buttons/Replies.tsx @@ -0,0 +1,22 @@ +import { JSXElement } from "solid-js"; + +import { ReplyIcon } from "../../Util/Icons"; +import { Post } from "../../Util/api"; + +export default function ReplyButton({ post }: { post: Post }): JSXElement { + return ( + <> +
+ + +

{post.comments}

+
+
+ + ); +} diff --git a/client-solid/src/Components/Buttons/Reply.tsx b/client-solid/src/Components/Buttons/Reply.tsx deleted file mode 100644 index ead9dd7..0000000 --- a/client-solid/src/Components/Buttons/Reply.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { JSXElement, Show, useContext } from "solid-js"; - -import { LoginContext } from "../../Context/GlobalState"; -import { ReplyIcon, ReportIcon } from "../../Util/Icons"; - -export default function ReplyButton(): JSXElement { - const login_ctx = useContext(LoginContext)!; - return ( - -
- -
-
- ); -} diff --git a/client-solid/src/Components/Comment.tsx b/client-solid/src/Components/Comment.tsx index d986055..bdc61c4 100644 --- a/client-solid/src/Components/Comment.tsx +++ b/client-solid/src/Components/Comment.tsx @@ -1,7 +1,6 @@ import { JSXElement } from "solid-js"; import { PublicComment } from "../Util/api"; -import ReplyButton from "./Buttons/Reply"; interface CommentProps { comment: PublicComment; @@ -16,18 +15,14 @@ interface CommentProps { export function Comment({ comment }: CommentProps): JSXElement { return ( <> -
+
-
{comment.content}
-
+
{comment.content}
-
- -
Replies to parent comment if any
-
+ +
Replies to parent comment if any
-
); } diff --git a/client-solid/src/Components/LoginButton.tsx b/client-solid/src/Components/LoginButton.tsx index 82fed43..53dce5d 100644 --- a/client-solid/src/Components/LoginButton.tsx +++ b/client-solid/src/Components/LoginButton.tsx @@ -35,7 +35,7 @@ export function LoginButton(): JSXElement { {showLogoutModal() && (