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