Skip to content

Commit 7c28ea5

Browse files
committed
fix avatar
1 parent 12dc3bb commit 7c28ea5

File tree

1 file changed

+35
-32
lines changed

1 file changed

+35
-32
lines changed

src/components/ProfileCard/ProfileCard.tsx

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ interface ProfileCardProps {
1919

2020
export default function ProfileCard({ userData, isLoading, error }: ProfileCardProps) {
2121
const [isModalOpen, setModalIsOpen] = useState<boolean | undefined>(false)
22-
console.log(userData)
2322

2423
const openModal = () => {
2524
setModalIsOpen(true)
@@ -31,35 +30,39 @@ export default function ProfileCard({ userData, isLoading, error }: ProfileCardP
3130

3231
return (
3332
<>
34-
<Tooltip
35-
showArrow
36-
offset={-150}
37-
crossOffset={-50}
38-
placement="right"
39-
content={
40-
<div className="px-1 py-2">
41-
<div className="font-bold text-small">Do you want to see my Skills?</div>
42-
<div className="text-tiny">Okay, let's click</div>
43-
</div>
44-
}
45-
classNames={{
46-
base: ['before:bg-neutral-400 dark:before:bg-white'],
47-
content: [
48-
'py-2 px-4 shadow-xl',
49-
'text-black bg-gradient-to-br from-white to-neutral-400'
50-
]
51-
}}
52-
>
53-
<Card isPressable isHoverable className="flex w-full mb-4" onPress={openModal}>
54-
<Skeleton isLoaded={!isLoading} className="w-full h-full">
33+
<Skeleton isLoaded={!isLoading} className="w-full h-full rounded-large">
34+
<Tooltip
35+
showArrow
36+
offset={-150}
37+
crossOffset={-50}
38+
placement="right"
39+
content={
40+
<div className="px-1 py-2">
41+
<div className="font-bold text-small">
42+
Do you want to see my Skills?
43+
</div>
44+
<div className="text-tiny">Okay, let's click</div>
45+
</div>
46+
}
47+
classNames={{
48+
base: ['before:bg-neutral-400 dark:before:bg-white'],
49+
content: [
50+
'py-2 px-4 shadow-xl',
51+
'text-black bg-gradient-to-br from-white to-neutral-400'
52+
]
53+
}}
54+
>
55+
<Card isPressable isHoverable className="flex w-full mb-4" onPress={openModal}>
5556
<div className="flex items-center justify-center justify-col mt-2">
56-
<Avatar
57-
isBordered
58-
color="success"
59-
radius="full"
60-
className="w-32 h-32 mb-4"
61-
src={userData?.avatar_url || ''}
62-
/>
57+
{userData && (
58+
<Avatar
59+
isBordered
60+
color="success"
61+
radius="full"
62+
className="w-32 h-32 mb-4 text-large "
63+
src={userData?.avatar_url}
64+
/>
65+
)}
6366
</div>
6467
<CardHeader className="items-center justify-center justify-col">
6568
<div className="flex flex-col items-center justify-center gap-1">
@@ -94,9 +97,9 @@ export default function ProfileCard({ userData, isLoading, error }: ProfileCardP
9497
<p className="text-default-400 text-small">Followers</p>
9598
</div>
9699
</CardFooter>
97-
</Skeleton>
98-
</Card>
99-
</Tooltip>
100+
</Card>
101+
</Tooltip>
102+
</Skeleton>
100103
{isModalOpen && <ModalSkills onClose={closeModal} />}
101104
</>
102105
)

0 commit comments

Comments
 (0)