From b5b256f6e9b8cc9787e7e3b3126f8419aaa12d0e Mon Sep 17 00:00:00 2001 From: Hollgy Date: Fri, 22 Mar 2024 13:27:11 +0100 Subject: [PATCH] Refactor of replies,Icon Swap --- .../src/Components/Buttons/CommentsButton.tsx | 17 ++++++++++++++++ client-solid/src/Components/Buttons/Reply.tsx | 20 +++++++++++++++++++ client-solid/src/Util/Icons.tsx | 20 ++++++++++++++++++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 client-solid/src/Components/Buttons/CommentsButton.tsx create mode 100644 client-solid/src/Components/Buttons/Reply.tsx diff --git a/client-solid/src/Components/Buttons/CommentsButton.tsx b/client-solid/src/Components/Buttons/CommentsButton.tsx new file mode 100644 index 0000000..700c7b0 --- /dev/null +++ b/client-solid/src/Components/Buttons/CommentsButton.tsx @@ -0,0 +1,17 @@ +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/Reply.tsx b/client-solid/src/Components/Buttons/Reply.tsx new file mode 100644 index 0000000..ead9dd7 --- /dev/null +++ b/client-solid/src/Components/Buttons/Reply.tsx @@ -0,0 +1,20 @@ +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/Util/Icons.tsx b/client-solid/src/Util/Icons.tsx index 68bf9ca..486e591 100644 --- a/client-solid/src/Util/Icons.tsx +++ b/client-solid/src/Util/Icons.tsx @@ -172,7 +172,7 @@ export function CheckMark(): JSXElement { ); } -export function ReplyIcon(): JSXElement { +export function CommentsIcon(): JSXElement { return ( ); } +export function ReplyIcon(): JSXElement { + return ( + + + + ); +}