feat(comments): add title to popup

This commit is contained in:
en 2025-02-19 18:53:22 +01:00
parent b39f8a4a4c
commit 7d91a5753a
2 changed files with 9 additions and 5 deletions
src
components/comment
routes

@ -25,7 +25,11 @@ import { useComments } from 'hooks/useComments'
import { CommentContent } from './CommentContent'
import { Dots } from 'components/Spinner'
export const CommentsPopup = () => {
interface CommentsPopupProps {
title: string
}
export const CommentsPopup = ({ title }: CommentsPopupProps) => {
const { naddr } = useParams()
const location = useLocation()
const { ndk } = useNDKContext()
@ -119,7 +123,7 @@ export const CommentsPopup = () => {
<div className='popUpMainCard'>
<div className='popUpMainCardTop'>
<div className='popUpMainCardTopInfo'>
<h3>Comment replies</h3>
<h3>{title}</h3>
</div>
<div

@ -109,7 +109,7 @@ export const routerWithNdkContext = (context: NDKContextType) =>
children: [
{
path: ':nevent',
element: <CommentsPopup />,
element: <CommentsPopup title='Comment replies' />,
loader: commentsLoader(context)
}
],
@ -136,7 +136,7 @@ export const routerWithNdkContext = (context: NDKContextType) =>
children: [
{
path: ':nevent',
element: <CommentsPopup />,
element: <CommentsPopup title='Comment replies' />,
loader: commentsLoader(context)
}
],
@ -209,7 +209,7 @@ export const routerWithNdkContext = (context: NDKContextType) =>
children: [
{
path: ':note',
element: <CommentsPopup />,
element: <CommentsPopup title='Note and replies' />,
loader: commentsLoader(context)
}
]