Skip to content

Commit

Permalink
feat: adds Link in NotificationTile (#2528)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeeanribeiro authored May 22, 2024
1 parent 9f55e18 commit b1777ca
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/shared/src/components/tiles/NotificationTile.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { notificationsManager } from '@auxiliary/wallet-connect/notifications'
import { Text, Tile } from '@bloomwalletio/ui'
import { Link, Text, Tile } from '@bloomwalletio/ui'
import { getBestTimeDuration } from '@core/utils'
import { NotificationAvatar } from '@ui/avatars'
import { NotifyClientTypes } from '@walletconnect/notify-client'
Expand All @@ -15,11 +15,16 @@
<div class="flex justify-between gap-4 w-full">
<NotificationAvatar {subscription} notificationType={notification.type} />
<div class="flex-grow flex flex-col items-start">
<div class="flex justify-between items-center gap-2">
<Text type="sm" lineClamp={1}>{notification.title}</Text>
<Text type="xs" fontWeight="normal"
>{getBestTimeDuration(new Date().getTime() - notification.sentAt, 'day', true)}</Text
>
<div class="w-full flex justify-between items-center gap-2">
<div class="flex items-center gap-2">
<Text type="sm" lineClamp={1}>{notification.title}</Text>
<Text type="xs" fontWeight="normal">
{getBestTimeDuration(new Date().getTime() - notification.sentAt, 'day', true)}
</Text>
</div>
{#if notification.url}
<Link textType="xs" href={notification.url} external />
{/if}
</div>
<Text type="xs" fontWeight="normal" lineClamp={2}>{notification.body}</Text>
</div>
Expand Down

0 comments on commit b1777ca

Please sign in to comment.