This commit is contained in:
Ren Amamiya
2023-05-24 11:34:26 +07:00
parent 6d43d2c53a
commit 221ff52a3f
13 changed files with 60 additions and 144 deletions

View File

@@ -1,10 +1,7 @@
import { Image } from "@shared/image";
import { DEFAULT_AVATAR, IMGPROXY_URL } from "@stores/constants";
import { DEFAULT_AVATAR } from "@stores/constants";
import { useProfile } from "@utils/hooks/useProfile";
import { shortenKey } from "@utils/shortenKey";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
@@ -31,9 +28,7 @@ export default function ChannelMessageUser({
<>
<div className="relative h-9 w-9 shrink rounded-md">
<Image
src={`${IMGPROXY_URL}/rs:fit:100:100/plain/${
user?.picture ? user.picture : DEFAULT_AVATAR
}`}
src={user?.picture || DEFAULT_AVATAR}
alt={pubkey}
className="h-9 w-9 rounded-md object-cover"
/>

View File

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