This commit is contained in:
Shusui MOYATANI
2023-05-14 20:36:54 +09:00
parent 9ed589dcd2
commit 55768db83e
21 changed files with 256 additions and 197 deletions

View File

@@ -0,0 +1,29 @@
import { Show } from 'solid-js';
// eslint-disable-next-line import/no-cycle
import EventDisplayById from '@/components/event/EventDisplayById';
import EventLink from '@/components/EventLink';
import { type MentionedEvent } from '@/nostr/parseTextNote';
export type MentionedEventDisplayProps = {
mentionedEvent: MentionedEvent;
};
const MentionedEventDisplay = (props: MentionedEventDisplayProps) => {
return (
<Show
when={props.mentionedEvent.marker != null && props.mentionedEvent.marker.length > 0}
fallback={<EventLink eventId={props.mentionedEvent.eventId} />}
>
<div class="my-1 rounded border p-1">
<EventDisplayById
eventId={props.mentionedEvent.eventId}
embedding={false}
actions={false}
/>
</div>
</Show>
);
};
export default MentionedEventDisplay;