diff --git a/public/images/svg/basenames-blue.svg b/public/images/svg/basenames-blue.svg new file mode 100644 index 00000000..c723a8d3 --- /dev/null +++ b/public/images/svg/basenames-blue.svg @@ -0,0 +1,10 @@ + diff --git a/public/images/svg/farcaster-purple.svg b/public/images/svg/farcaster-purple.svg new file mode 100644 index 00000000..cd730947 --- /dev/null +++ b/public/images/svg/farcaster-purple.svg @@ -0,0 +1,3 @@ + diff --git a/public/images/svg/lens-green.svg b/public/images/svg/lens-green.svg new file mode 100644 index 00000000..2767a814 --- /dev/null +++ b/public/images/svg/lens-green.svg @@ -0,0 +1,10 @@ + diff --git a/public/images/svg/web3bio-2.svg b/public/images/svg/web3bio-2.svg new file mode 100644 index 00000000..956e5f9b --- /dev/null +++ b/public/images/svg/web3bio-2.svg @@ -0,0 +1,11 @@ + diff --git a/src/domain/profile/widgets/profile-card/ProfileAvatar.tsx b/src/domain/profile/widgets/profile-card/ProfileAvatar.tsx new file mode 100644 index 00000000..81e8b31e --- /dev/null +++ b/src/domain/profile/widgets/profile-card/ProfileAvatar.tsx @@ -0,0 +1,73 @@ +/** + * Copyright 2024 OpenBuild + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Image from 'next/image'; +import Web3BioIcon from 'public/images/svg/web3bio.svg'; + +import Avatar from '@/components/Avatar'; + +function ProfileAvatar({ + data, + className, +}: { + data: { + base: { user_avatar?: string; user_nick_name: string }; + web3Bio?: Array<{ + avatar: string; + }>; + }; + className: string; +}) { + const size = 110; + const avatarClassName = 'rounded-full object-fill'; + + const baseAvatar = data?.base?.user_avatar; + const web3BioAvatar = data?.web3Bio?.filter(v => v.avatar).find(v => v.avatar)?.avatar ?? ''; + const avatarAlt = data?.base?.user_nick_name; + const showBaseAvatar = (baseAvatar && !baseAvatar.includes('/config/avatar')) || !web3BioAvatar; + + return ( +
- {data.base?.user_city}, {data.base?.user_country} -
-{data?.base.user_bio !== '' ? data?.base.user_bio : '--'}
+ {!creatorAvailable && ( ++ {data.base?.user_city}, {data.base?.user_country} +
+{getUserDesc(data)}
Social Profiles
{children}
More from web3.bio
-