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) => (
+ onClickCallback={schemaSelectionCallback} className='' />
))} @@ -217,7 +217,7 @@ const SchemaList = (props: { schemaSelectionCallback: (schemaId: string, schemaD ) : ( } diff --git a/src/components/organization/EditOrgdetailsModal.tsx b/src/components/organization/EditOrgdetailsModal.tsx index 90bb8225e..f37487ef2 100644 --- a/src/components/organization/EditOrgdetailsModal.tsx +++ b/src/components/organization/EditOrgdetailsModal.tsx @@ -224,7 +224,7 @@ const EditOrgdetailsModal = (props: EditOrgdetailsModalProps) => { description: yup .string() .min(2, 'Organization description must be at least 2 characters') - .max(600, 'Organization description must be at most 600 characters') + .max(255, 'Organization description must be at most 255 characters') .required('Description is required') })} validateOnBlur diff --git a/src/pages/index.astro b/src/pages/index.astro index 97f555c83..b858243e4 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -11,6 +11,7 @@ import { pathRoutes } from '../config/pathRoutes';