Done for now
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user