Done for now

This commit is contained in:
2024-01-09 13:30:32 +01:00
parent 510545bf82
commit 3fbcfe5797
2 changed files with 12 additions and 10 deletions
+3 -3
View File
@@ -2,13 +2,13 @@ import InputCom from "../Helpers/Inputs/InputCom/index";
import UpdateButton from "./UpdateButton";
const YourPageForm = ({ values, onChange, onSubmit, loading }) => (
<div className="ml-16 mb-2 flex flex-col gap-3">
<div className="ml-16 my-2 flex flex-col gap-3">
<div className="field w-full">
<InputCom
fieldClass="px-4 transfer-field"
fieldClass="px-4"
parentClass="flex items-center gap-1 justify-between"
labelClass="flex-[0.2] mb-0 font-semibold"
inputClass="flex-[0.8] transfer-field"
inputClass="flex-[0.8]"
inputBg="bg-slate-100"
label="Introduction: "
type="text"
+9 -7
View File
@@ -28,14 +28,16 @@ const YourPage = () => {
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,