Browse Source

feat: increase medium avatar size

imwald
codytseng 8 months ago
parent
commit
ece003ca4f
  1. 7
      src/components/Embedded/EmbeddedNote.tsx
  2. 4
      src/components/ReplyNote/index.tsx
  3. 6
      src/components/UserAvatar/index.tsx

7
src/components/Embedded/EmbeddedNote.tsx

@ -33,8 +33,11 @@ function EmbeddedNoteSkeleton({ className }: { className?: string }) { @@ -33,8 +33,11 @@ function EmbeddedNoteSkeleton({ className }: { className?: string }) {
onClick={(e) => e.stopPropagation()}
>
<div className="flex items-center space-x-2">
<Skeleton className="w-7 h-7 rounded-full" />
<Skeleton className="h-3 w-16 my-1" />
<Skeleton className="w-9 h-9 rounded-full" />
<div>
<Skeleton className="h-3 w-16 my-1" />
<Skeleton className="h-3 w-16 my-1" />
</div>
</div>
<Skeleton className="w-full h-4 my-1 mt-2" />
<Skeleton className="w-2/3 h-4 my-1" />

4
src/components/ReplyNote/index.tsx

@ -48,7 +48,7 @@ export default function ReplyNote({ @@ -48,7 +48,7 @@ export default function ReplyNote({
>
<Collapsible>
<div className="flex space-x-2 items-start px-4 pt-3">
<UserAvatar userId={event.pubkey} size="medium" className="shrink-0 mt-1" />
<UserAvatar userId={event.pubkey} size="medium" className="shrink-0 mt-0.5" />
<div className="w-full overflow-hidden">
<div className="flex items-start justify-between gap-2">
<div className="flex-1 w-0">
@ -113,7 +113,7 @@ export default function ReplyNote({ @@ -113,7 +113,7 @@ export default function ReplyNote({
export function ReplyNoteSkeleton() {
return (
<div className="px-4 py-3 flex items-start space-x-2 w-full">
<Skeleton className="w-8 h-8 rounded-full shrink-0" />
<Skeleton className="w-9 h-9 rounded-full shrink-0 mt-0.5" />
<div className="w-full">
<div className="py-1">
<Skeleton className="h-3 w-16" />

6
src/components/UserAvatar/index.tsx

@ -2,19 +2,19 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' @@ -2,19 +2,19 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@/components/ui/hover-card'
import { Skeleton } from '@/components/ui/skeleton'
import { useFetchProfile } from '@/hooks'
import { generateImageByPubkey } from '@/lib/pubkey'
import { toProfile } from '@/lib/link'
import { generateImageByPubkey } from '@/lib/pubkey'
import { cn } from '@/lib/utils'
import { SecondaryPageLink } from '@/PageManager'
import ProfileCard from '../ProfileCard'
import { useMemo } from 'react'
import ProfileCard from '../ProfileCard'
const UserAvatarSizeCnMap = {
large: 'w-24 h-24',
big: 'w-16 h-16',
semiBig: 'w-12 h-12',
normal: 'w-10 h-10',
medium: 'w-8 h-8',
medium: 'w-9 h-9',
small: 'w-7 h-7',
xSmall: 'w-5 h-5',
tiny: 'w-4 h-4'

Loading…
Cancel
Save