feat: add lightbox to profile avatar and banner (#661)
This commit is contained in:
parent
82c13006ff
commit
19eaf1a4e3
3 changed files with 160 additions and 6 deletions
|
|
@ -3,12 +3,13 @@ import FollowButton from '@/components/FollowButton'
|
|||
import Nip05 from '@/components/Nip05'
|
||||
import NpubQrCode from '@/components/NpubQrCode'
|
||||
import ProfileAbout from '@/components/ProfileAbout'
|
||||
import ProfileBanner from '@/components/ProfileBanner'
|
||||
import { BannerWithLightbox } from '@/components/ProfileBanner'
|
||||
import ProfileOptions from '@/components/ProfileOptions'
|
||||
import ProfileZapButton from '@/components/ProfileZapButton'
|
||||
import PubkeyCopy from '@/components/PubkeyCopy'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Skeleton } from '@/components/ui/skeleton'
|
||||
import { AvatarWithLightbox } from '@/components/UserAvatar'
|
||||
import { useFetchFollowings, useFetchProfile } from '@/hooks'
|
||||
import { toMuteList, toProfileEditor } from '@/lib/link'
|
||||
import { SecondaryPageLink, useSecondaryPage } from '@/PageManager'
|
||||
|
|
@ -20,7 +21,6 @@ import { useCallback, useEffect, useMemo, useState } from 'react'
|
|||
import { useTranslation } from 'react-i18next'
|
||||
import NotFound from '../NotFound'
|
||||
import SearchInput from '../SearchInput'
|
||||
import { SimpleUserAvatar } from '../UserAvatar'
|
||||
import FollowedBy from './FollowedBy'
|
||||
import Followings from './Followings'
|
||||
import ProfileFeed from './ProfileFeed'
|
||||
|
|
@ -114,10 +114,11 @@ export default function Profile({ id }: { id?: string }) {
|
|||
<>
|
||||
<div ref={topContainerRef}>
|
||||
<div className="relative bg-cover bg-center mb-2">
|
||||
<ProfileBanner banner={banner} pubkey={pubkey} className="w-full aspect-[3/1]" />
|
||||
<SimpleUserAvatar
|
||||
<BannerWithLightbox banner={banner} pubkey={pubkey} className="w-full aspect-[3/1]" />
|
||||
<AvatarWithLightbox
|
||||
userId={pubkey}
|
||||
className="w-24 h-24 absolute left-3 bottom-0 translate-y-1/2 border-4 border-background rounded-full"
|
||||
size="large"
|
||||
className="absolute left-3 bottom-0 translate-y-1/2 border-4 border-background"
|
||||
/>
|
||||
</div>
|
||||
<div className="px-4">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue