feat: quotes
This commit is contained in:
parent
00866fd73a
commit
5913cc3b88
20 changed files with 311 additions and 22 deletions
28
src/components/NoteInteractions/index.tsx
Normal file
28
src/components/NoteInteractions/index.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { Separator } from '@/components/ui/separator'
|
||||
import { Event } from 'nostr-tools'
|
||||
import { useState } from 'react'
|
||||
import QuoteList from '../QuoteList'
|
||||
import ReplyNoteList from '../ReplyNoteList'
|
||||
import { Tabs, TTabValue } from './Tabs'
|
||||
|
||||
export default function NoteInteractions({
|
||||
pageIndex,
|
||||
event
|
||||
}: {
|
||||
pageIndex?: number
|
||||
event: Event
|
||||
}) {
|
||||
const [type, setType] = useState<TTabValue>('replies')
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tabs selectedTab={type} onTabChange={setType} />
|
||||
<Separator />
|
||||
{type === 'replies' ? (
|
||||
<ReplyNoteList index={pageIndex} event={event} />
|
||||
) : (
|
||||
<QuoteList event={event} />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue