Added profile img
This commit is contained in:
@@ -68,6 +68,7 @@ export default function PersonalInfoTab({
|
||||
state: userDetails?.state,
|
||||
city: userDetails?.city,
|
||||
email: userDetails?.email,
|
||||
profile: userDetails?.profile_pic,
|
||||
};
|
||||
|
||||
let [profile, setProfile] = useState({
|
||||
@@ -86,6 +87,9 @@ export default function PersonalInfoTab({
|
||||
const handleUpdateUser = (values, helpers) => {
|
||||
setRequestState({ message: "", loading: true, status: false });
|
||||
|
||||
// there is no profile accommodation on the payload
|
||||
delete values?.profile;
|
||||
|
||||
apiCall
|
||||
.updateProfile(values)
|
||||
.then((res) => {
|
||||
@@ -336,8 +340,8 @@ export default function PersonalInfoTab({
|
||||
<div className="w-full relative">
|
||||
<img
|
||||
src={profileImg}
|
||||
alt=""
|
||||
className="sm:w-[198px] sm:h-[198px] w-[120px] h-[120px] rounded-full overflow-hidden object-cover"
|
||||
alt="profile"
|
||||
className="sm:w-[198px] sm:h-[198px] w-[120px] h-[120px] rounded-full overflow-hidden object-contain object-center"
|
||||
/>
|
||||
<input
|
||||
ref={profileImgInput}
|
||||
@@ -384,7 +388,8 @@ export default function PersonalInfoTab({
|
||||
)}
|
||||
<div className="w-full h-[120px] border-t border-light-purple dark:border-[#5356fb29] flex justify-end items-center">
|
||||
<div className="flex items-center space-x-4 mr-9">
|
||||
<Link
|
||||
|
||||
{/* <Link
|
||||
to="/"
|
||||
className="text-18 text-light-red tracking-wide "
|
||||
>
|
||||
@@ -392,7 +397,7 @@ export default function PersonalInfoTab({
|
||||
{" "}
|
||||
Cancel
|
||||
</span>
|
||||
</Link>
|
||||
</Link> */}
|
||||
|
||||
{requestStatus.loading ? (
|
||||
<LoadingSpinner size="8" color="sky-blue" />
|
||||
|
||||
Reference in New Issue
Block a user