Feed - posts #227

Merged
enes merged 23 commits from feat/131-feed-posts into staging 2025-02-14 19:54:29 +00:00
Showing only changes of commit ed42f481e6 - Show all commits

View File

@ -9,7 +9,12 @@ import {
useNavigate, useNavigate,
useParams useParams
} from 'react-router-dom' } from 'react-router-dom'
import { getBlogPageRoute, getModPageRoute, getProfilePageRoute } from 'routes' import {
appRoutes,
getBlogPageRoute,
getModPageRoute,
getProfilePageRoute
} from 'routes'
import { CommentEvent, UserProfile } from 'types' import { CommentEvent, UserProfile } from 'types'
import { CommentsLoaderResult } from 'types/comments' import { CommentsLoaderResult } from 'types/comments'
import { adjustTextareaHeight, handleCommentSubmit, hexToNpub } from 'utils' import { adjustTextareaHeight, handleCommentSubmit, hexToNpub } from 'utils'
@ -28,11 +33,14 @@ export const CommentsPopup = () => {
useBodyScrollDisable(true) useBodyScrollDisable(true)
const isMod = location.pathname.includes('/mod/') const isMod = location.pathname.includes('/mod/')
const isBlog = location.pathname.includes('/blog/') const isBlog = location.pathname.includes('/blog/')
const isNote = location.pathname.includes('/feed/')
const baseUrl = naddr const baseUrl = naddr
? isMod ? isMod
? getModPageRoute(naddr) ? getModPageRoute(naddr)
: isBlog : isBlog
? getBlogPageRoute(naddr) ? getBlogPageRoute(naddr)
: isNote
? appRoutes.feed
: undefined : undefined
: undefined : undefined