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