Skip to content

Commit

Permalink
shadow and border added to user avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonath-z committed Jun 12, 2022
1 parent 9a558aa commit 620ea20
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const AvatarAndCoverCard = ({ user }: IProps) => {
return (
<div className="relative">
<img
src={user?.coverUrl || user?.coverThumbnailUrl}
src={user?.coverUrl || user?.coverThumbnailUrl || NoCoverImg.src}
alt={user?.username}
className="h-[260px] w-full object-cover rounded-2xl"
/>
Expand All @@ -26,9 +26,7 @@ const AvatarAndCoverCard = ({ user }: IProps) => {
onUserAvatarClicked={() =>
router.push(`/profile/${user?.walletAddress}`)
}
identiconContainerClassName={
"bg-red rounded-full overflow-hidden -mt-20 p-5 border-1 border-gray-400"
}
identiconContainerClassName="rounded-full overflow-hidden -mt-20 p-5 border-2 shadow-xl bg-white border-gray-100"
userAvatarClassName={
"h-[120px] w-[120px] -mt-20 object-cover border-4 border-white border-solid rounded-full relative"
}
Expand Down
4 changes: 2 additions & 2 deletions components/modules/__modules__/Card/UserAvatarCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ interface IProps {

const UserAvatarCard: FC<IProps> = ({
user,
identiconSize,
identiconSize = 20,
userAvatarClassName,
identiconContainerClassName,
identiconContainerClassName = "bg-white rounded-full overflow-hidden border border-gray-300 p-3",
allowVerifiedIcon = false,
onUserAvatarClicked,
}) => {
Expand Down
1 change: 0 additions & 1 deletion components/modules/__secured/Profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { SaleContainer } from "@components/modules/__secured/Profile/saleContain
import { UserAccount } from "@lib/models/UserAccount";
import { middleEllipsis } from "../../../../helpers/truncateStrings";
import ProfileMenu from "../ProfileMenu";
import dummy_profile from "@components/DropPage/AvatarAndCover/dummy_profile";
import AvatarAndCoverCard from "@components/modules/__modules__/Card/AvatartAndCoverCard";
import TabList from "./module/TabList";
import OwnedContainer from "./OwnedContainer";
Expand Down
10 changes: 9 additions & 1 deletion components/modules/__secured/ProfileMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ const ProfileMenu = () => {
setIsProfileMenu(!isProfileMenu);
};

const onRedirectToEditProfile = () => {
router.push("edith/profile");
setIsProfileMenu(!isProfileMenu);
};

return (
<div
className={`${
Expand Down Expand Up @@ -76,7 +81,10 @@ const ProfileMenu = () => {
walletBalance={balance + "ETH"}
/>
</div>
<button className="flex items-center hover:bg-gray-100 py-3 rounded-xl px-3 transition-all w-full">
<button
onClick={onRedirectToEditProfile}
className="flex items-center hover:bg-gray-100 py-3 rounded-xl px-3 transition-all w-full"
>
<VUser className="text-2xl" />
<span className="px-3 font-ibmPlexSans font-bold">
Edit profile
Expand Down
2 changes: 1 addition & 1 deletion lib/Resources.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import VerifiedImg from "/public/static/images/rarible-checkmark.png";
import NoCoverImg from "/public/static/images/noCover.png";
import NoCoverImg from "/public/static/images/noCover.jpeg";

export { VerifiedImg, NoCoverImg };
Binary file removed public/static/images/noCover.png
Binary file not shown.

0 comments on commit 620ea20

Please sign in to comment.