- Feed bounded context with DDD implementation (Phases 1-5) - Domain event handlers for cross-context coordination - Fix Blossom media upload setting persistence - Fix wallet connection persistence on page reload - New branding assets and icons - Vitest testing infrastructure with 151 domain model tests - Help page scaffolding - Keyboard navigation provider 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
53 lines
1.7 KiB
TypeScript
53 lines
1.7 KiB
TypeScript
import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area'
|
|
import { Separator } from '@/components/ui/separator'
|
|
import { Event } from 'nostr-tools'
|
|
import { useState } from 'react'
|
|
import HideUntrustedContentButton from '../HideUntrustedContentButton'
|
|
import QuoteList from '../QuoteList'
|
|
import ReactionList from '../ReactionList'
|
|
import ReplyNoteList from '../ReplyNoteList'
|
|
import RepostList from '../RepostList'
|
|
import ZapList from '../ZapList'
|
|
import { Tabs, TTabValue } from './Tabs'
|
|
|
|
export default function NoteInteractions({ event, navIndexOffset = 0 }: { event: Event; navIndexOffset?: number }) {
|
|
const [type, setType] = useState<TTabValue>('replies')
|
|
let list
|
|
switch (type) {
|
|
case 'replies':
|
|
list = <ReplyNoteList stuff={event} navIndexOffset={navIndexOffset} />
|
|
break
|
|
case 'quotes':
|
|
list = <QuoteList stuff={event} />
|
|
break
|
|
case 'reactions':
|
|
list = <ReactionList stuff={event} />
|
|
break
|
|
case 'reposts':
|
|
list = <RepostList event={event} />
|
|
break
|
|
case 'zaps':
|
|
list = <ZapList event={event} />
|
|
break
|
|
default:
|
|
break
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<div className="flex items-center justify-between">
|
|
<ScrollArea className="flex-1 w-0">
|
|
<Tabs selectedTab={type} onTabChange={setType} />
|
|
<ScrollBar orientation="horizontal" className="opacity-0 pointer-events-none" />
|
|
</ScrollArea>
|
|
<Separator orientation="vertical" className="h-6" />
|
|
<div className="size-10 flex items-center justify-center">
|
|
<HideUntrustedContentButton type="interactions" />
|
|
</div>
|
|
</div>
|
|
<Separator />
|
|
{list}
|
|
</>
|
|
)
|
|
}
|