-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Dunsin <78784850+Dun-sin@users.noreply.github.com>
- Loading branch information
Showing
10 changed files
with
1,254 additions
and
38 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { HiUserCircle, HiPencil } from 'react-icons/hi'; | ||
import PropTypes from 'prop-types'; | ||
|
||
|
||
export default function UserAvatar({imageRef, onUploadClick, onEditClick }) { | ||
return ( | ||
<div className="relative group"> | ||
{imageRef?.current.src ? ( | ||
<> | ||
<img | ||
src={imageRef.current.src} | ||
ref={imageRef} | ||
alt="Profile Image" | ||
className="h-20 w-20 rounded-full" | ||
/> | ||
<div className="absolute top-0 -right-5 opacity-0 group-hover:opacity-100 flex items-center space-x-2"> | ||
<HiPencil | ||
className="text-blue-500 h-6 w-6 cursor-pointer" | ||
onClick={onEditClick} | ||
/> | ||
</div> | ||
</> | ||
) : ( | ||
<HiUserCircle | ||
className="text-highlight h-20 w-20 cursor-pointer" | ||
onClick={onUploadClick} | ||
title='upload profile image' | ||
/> | ||
)} | ||
</div> | ||
) | ||
}; | ||
|
||
UserAvatar.propTypes = { | ||
imageRef: PropTypes.object, | ||
onUploadClick: PropTypes.func, | ||
onEditClick: PropTypes.func, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1 comment
on commit 15ba8c3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Dun-sin,
Can you check on client side its facing issue and also if you see here vercel build also failed
Causing dependency issues