diff --git a/src/components/Profile/EditUserProfile.tsx b/src/components/Profile/EditUserProfile.tsx index 216e829bc..16503a359 100644 --- a/src/components/Profile/EditUserProfile.tsx +++ b/src/components/Profile/EditUserProfile.tsx @@ -1,13 +1,12 @@ import { useEffect, useState } from "react"; import type { UserProfile } from "./interfaces"; -import { getFromLocalStorage, getUserProfile, updateUserProfile } from "../../api/Auth"; -import { IMG_MAX_HEIGHT, IMG_MAX_WIDTH, apiStatusCodes, imageSizeAccepted, storageKeys } from "../../config/CommonConstant"; +import { setToLocalStorage, updateUserProfile } from "../../api/Auth"; +import { IMG_MAX_HEIGHT, IMG_MAX_WIDTH, imageSizeAccepted, storageKeys } from "../../config/CommonConstant"; import type { AxiosResponse } from "axios"; import CustomAvatar from '../Avatar' import { calculateSize, dataURItoBlob } from "../../utils/CompressImage"; -import { Avatar, Button, Label } from "flowbite-react"; +import { Button, Label } from "flowbite-react"; import { Field, Form, Formik, FormikHelpers } from "formik"; -import { asset } from "../../lib/data"; import * as yup from "yup" interface Values { @@ -145,10 +144,6 @@ const UpdateUserProfile = ({ toggleEditProfile, userProfileInfo, updateProfile } const updateUserDetails = async (values: Values) => { - - console.log(`Image::`, logoImage?.imagePreviewUrl); - - setLoading(true) const userData = { @@ -162,9 +157,10 @@ const UpdateUserProfile = ({ toggleEditProfile, userProfileInfo, updateProfile } const resUpdateUserDetails = await updateUserProfile(userData) const { data } = resUpdateUserDetails as AxiosResponse + setToLocalStorage(storageKeys.USER_PROFILE, userData) updateProfile(userData); - + window.location.reload() setLoading(false) } @@ -251,22 +247,24 @@ const UpdateUserProfile = ({ toggleEditProfile, userProfileInfo, updateProfile } diff --git a/src/components/Resources/Schema/SchemasList.tsx b/src/components/Resources/Schema/SchemasList.tsx index cfc4d63f5..44d9d47df 100644 --- a/src/components/Resources/Schema/SchemasList.tsx +++ b/src/components/Resources/Schema/SchemasList.tsx @@ -197,7 +197,7 @@ const SchemaList = (props: { schemaSelectionCallback: (schemaId: string, schemaD schemaList.map((element, key) => (