diff --git a/src/components/YourPage/YourPageForm.jsx b/src/components/YourPage/YourPageForm.jsx index 0074c17..5dea482 100644 --- a/src/components/YourPage/YourPageForm.jsx +++ b/src/components/YourPage/YourPageForm.jsx @@ -2,13 +2,13 @@ import InputCom from "../Helpers/Inputs/InputCom/index"; import UpdateButton from "./UpdateButton"; const YourPageForm = ({ values, onChange, onSubmit, loading }) => ( -
+
{ let api = new usersService(); const res = await api.MyPageIntro(pageValues); - setResponse({ - loading: false, - data: res.data, - msg: "Page updated successfully", - }); + setTimeout(() => { + setResponse({ + loading: false, + data: res.data, + msg: "Page updated successfully", + }); - // Clear form after successful update - setPageValues({ intro: "", description: "" }); + // Clear form after successful update + setPageValues({ intro: "", description: "" }); + }, 2000); } catch (error) { setResponse({ loading: false,