From e7daa0488662a743cda4e4a3941df85a2829f65e Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 24 Dec 2023 16:10:47 +0100 Subject: [PATCH] feat(reply): add inbox reply design for notifications --- .../post/comment-tools/comment-tools.tsx | 6 +- src/components/reply/reply.module.css | 48 +++++- src/components/reply/reply.tsx | 160 ++++++++++++------ src/themes.css | 2 + 4 files changed, 155 insertions(+), 61 deletions(-) diff --git a/src/components/post/comment-tools/comment-tools.tsx b/src/components/post/comment-tools/comment-tools.tsx index 85dee8b0..ca158b08 100644 --- a/src/components/post/comment-tools/comment-tools.tsx +++ b/src/components/post/comment-tools/comment-tools.tsx @@ -1,4 +1,4 @@ -import { Link } from 'react-router-dom'; +import { Link, useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { Author, useAccount, useComment, useSubplebbit } from '@plebbit/plebbit-react-hooks'; import styles from './comment-tools.module.css'; @@ -6,6 +6,7 @@ import HideMenu from './hide-menu'; import ModTools from './mod-menu'; import ShareMenu from './share-menu'; import { FailedLabel, PendingLabel, SpoilerLabel } from '../label'; +import { isInboxView } from '../../../lib/utils/view-utils'; interface CommentToolsProps { author?: Author; @@ -115,9 +116,10 @@ const CommentTools = ({ const authorRole = useSubplebbit({ subplebbitAddress })?.roles?.[account?.author?.address]?.role; const isMod = authorRole === 'admin' || authorRole === 'owner' || authorRole === 'moderator'; hasLabel = spoiler || (cid === undefined && !isReply); + const isInboxPage = isInboxView(useLocation().pathname); return ( -