mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-18 06:24:25 +01:00
update nostr-tools
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { For, Switch, Match, type Component, Show } from 'solid-js';
|
||||
|
||||
import { Kind, type Event as NostrEvent } from 'nostr-tools';
|
||||
import * as Kind from 'nostr-tools/kinds';
|
||||
import { type Event as NostrEvent } from 'nostr-tools/pure';
|
||||
|
||||
import ColumnItem from '@/components/ColumnItem';
|
||||
import Reaction from '@/components/event/Reaction';
|
||||
@@ -20,18 +21,18 @@ const Notification: Component<NotificationProps> = (props) => {
|
||||
{(event) => (
|
||||
<Show when={!shouldMuteEvent(event)}>
|
||||
<Switch fallback={<div>unknown event</div>}>
|
||||
<Match when={event.kind === (Kind.Text as number)}>
|
||||
<Match when={event.kind === Kind.ShortTextNote}>
|
||||
<ColumnItem>
|
||||
<TextNote event={event} />
|
||||
</ColumnItem>
|
||||
</Match>
|
||||
<Match when={event.kind === (Kind.Reaction as number)}>
|
||||
<Match when={event.kind === Kind.Reaction}>
|
||||
<ColumnItem>
|
||||
<Reaction event={event} />
|
||||
</ColumnItem>
|
||||
</Match>
|
||||
{/* TODO ちゃんとnotification用のコンポーネント使う */}
|
||||
<Match when={event.kind === (Kind.Repost as number)}>
|
||||
<Match when={event.kind === Kind.Repost}>
|
||||
<ColumnItem>
|
||||
<Repost event={event} />
|
||||
</ColumnItem>
|
||||
|
||||
Reference in New Issue
Block a user