Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New profile picture feature #7995

13 changes: 10 additions & 3 deletions src/Components/Common/Sidebar/SidebarUserCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Link } from "raviger";
import { useTranslation } from "react-i18next";
import CareIcon from "../../../CAREUI/icons/CareIcon";
import { formatName } from "../../../Utils/utils";
import { classNames, formatName } from "../../../Utils/utils";
import useAuthUser, { useAuthContext } from "../../../Common/hooks/useAuthUser";

const SidebarUserCard = ({ shrinked }: { shrinked: boolean }) => {
Expand All @@ -15,8 +15,15 @@ const SidebarUserCard = ({ shrinked }: { shrinked: boolean }) => {
shrinked ? "mx-auto flex-col" : "mx-5"
} transition-all duration-200 ease-in-out`}
>
<Link href="/user/profile" className="flex-none py-3">
<CareIcon icon="l-user-circle" className="text-3xl text-white" />
<Link href="/user/profile">
<img
src={user.read_profile_picture_url || "/images/empty_avatar.jpg"}
alt="profile"
className={classNames(
"mb-3 h-10 w-10 rounded-full object-cover",
UdaySagar-Git marked this conversation as resolved.
Show resolved Hide resolved
shrinked && "mb-2 mt-1",
)}
/>
</Link>
<div className="flex cursor-pointer justify-center" onClick={signOut}>
<CareIcon
Expand Down
Loading
Loading