From ed42f481e6cc4d1fc209eb44788d29045ab59cc9 Mon Sep 17 00:00:00 2001 From: en Date: Fri, 14 Feb 2025 13:05:59 +0100 Subject: [PATCH] feat(comments): accept note from feed in commentspopup --- src/components/comment/CommentsPopup.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/comment/CommentsPopup.tsx b/src/components/comment/CommentsPopup.tsx index 527261d..662923b 100644 --- a/src/components/comment/CommentsPopup.tsx +++ b/src/components/comment/CommentsPopup.tsx @@ -9,7 +9,12 @@ import { useNavigate, useParams } from 'react-router-dom' -import { getBlogPageRoute, getModPageRoute, getProfilePageRoute } from 'routes' +import { + appRoutes, + getBlogPageRoute, + getModPageRoute, + getProfilePageRoute +} from 'routes' import { CommentEvent, UserProfile } from 'types' import { CommentsLoaderResult } from 'types/comments' import { adjustTextareaHeight, handleCommentSubmit, hexToNpub } from 'utils' @@ -28,11 +33,14 @@ export const CommentsPopup = () => { useBodyScrollDisable(true) const isMod = location.pathname.includes('/mod/') const isBlog = location.pathname.includes('/blog/') + const isNote = location.pathname.includes('/feed/') const baseUrl = naddr ? isMod ? getModPageRoute(naddr) : isBlog ? getBlogPageRoute(naddr) + : isNote + ? appRoutes.feed : undefined : undefined