update chat

This commit is contained in:
Ren Amamiya
2023-04-28 15:20:10 +07:00
parent 87e8ee8954
commit f751c1f18f
20 changed files with 183 additions and 438 deletions

View File

@@ -1,4 +1,4 @@
import { DEFAULT_AVATAR } from '@lume/stores/constants';
import { DEFAULT_AVATAR, IMGPROXY_URL } from '@lume/stores/constants';
import { useProfile } from '@lume/utils/hooks/useProfile';
import { shortenKey } from '@lume/utils/shortenKey';
@@ -25,7 +25,7 @@ export default function ChannelMessageUser({ pubkey, time }: { pubkey: string; t
<>
<div className="relative h-9 w-9 shrink rounded-md">
<img
src={user?.picture || DEFAULT_AVATAR}
src={`${IMGPROXY_URL}/rs:fit:100:100/plain/${user?.picture ? user.picture : DEFAULT_AVATAR}`}
alt={pubkey}
className="h-9 w-9 rounded-md object-cover"
loading="lazy"

View File

@@ -1,4 +1,4 @@
import { DEFAULT_AVATAR } from '@lume/stores/constants';
import { DEFAULT_AVATAR, IMGPROXY_URL } from '@lume/stores/constants';
import { useProfile } from '@lume/utils/hooks/useProfile';
import { shortenKey } from '@lume/utils/shortenKey';
@@ -16,7 +16,7 @@ export default function UserReply({ pubkey }: { pubkey: string }) {
<>
<div className="relative h-7 w-7 shrink overflow-hidden rounded">
<img
src={user?.picture || DEFAULT_AVATAR}
src={`${IMGPROXY_URL}/rs:fit:100:100/plain/${user?.picture ? user.picture : DEFAULT_AVATAR}`}
alt={pubkey}
className="h-7 w-7 rounded object-cover"
loading="lazy"