|
|
|
@ -1,4 +1,4 @@ |
|
|
|
import { useSecondaryPage } from '@/PageManager' |
|
|
|
import { useSecondaryPage, useSmartNoteNavigation } from '@/PageManager' |
|
|
|
import { ExtendedKind } from '@/constants' |
|
|
|
import { ExtendedKind } from '@/constants' |
|
|
|
import ContentPreview from '@/components/ContentPreview' |
|
|
|
import ContentPreview from '@/components/ContentPreview' |
|
|
|
import Note from '@/components/Note' |
|
|
|
import Note from '@/components/Note' |
|
|
|
@ -155,7 +155,10 @@ function ExternalRoot({ value }: { value: string }) { |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<Card |
|
|
|
<Card |
|
|
|
className="flex space-x-1 px-1.5 py-1 items-center clickable text-sm text-muted-foreground hover:text-foreground" |
|
|
|
className="flex space-x-1 px-1.5 py-1 items-center clickable text-sm text-muted-foreground hover:text-foreground" |
|
|
|
onClick={() => push(toNoteList({ externalContentId: value }))} |
|
|
|
onClick={() => { |
|
|
|
|
|
|
|
// For external content, we still use secondary page navigation
|
|
|
|
|
|
|
|
push(toNoteList({ externalContentId: value })) |
|
|
|
|
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
<div className="truncate">{value}</div> |
|
|
|
<div className="truncate">{value}</div> |
|
|
|
</Card> |
|
|
|
</Card> |
|
|
|
@ -175,7 +178,7 @@ function ParentNote({ |
|
|
|
isFetching: boolean |
|
|
|
isFetching: boolean |
|
|
|
isConsecutive?: boolean |
|
|
|
isConsecutive?: boolean |
|
|
|
}) { |
|
|
|
}) { |
|
|
|
const { push } = useSecondaryPage() |
|
|
|
const { navigateToNote } = useSmartNoteNavigation() |
|
|
|
|
|
|
|
|
|
|
|
if (isFetching) { |
|
|
|
if (isFetching) { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
@ -199,7 +202,7 @@ function ParentNote({ |
|
|
|
event && 'hover:text-foreground' |
|
|
|
event && 'hover:text-foreground' |
|
|
|
)} |
|
|
|
)} |
|
|
|
onClick={() => { |
|
|
|
onClick={() => { |
|
|
|
push(toNote(event ?? eventBech32Id)) |
|
|
|
navigateToNote(toNote(event ?? eventBech32Id)) |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{event && <UserAvatar userId={event.pubkey} size="tiny" className="shrink-0" />} |
|
|
|
{event && <UserAvatar userId={event.pubkey} size="tiny" className="shrink-0" />} |
|
|
|
|