Done for now
This commit is contained in:
@@ -2,13 +2,13 @@ import InputCom from "../Helpers/Inputs/InputCom/index";
|
|||||||
import UpdateButton from "./UpdateButton";
|
import UpdateButton from "./UpdateButton";
|
||||||
|
|
||||||
const YourPageForm = ({ values, onChange, onSubmit, loading }) => (
|
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">
|
<div className="field w-full">
|
||||||
<InputCom
|
<InputCom
|
||||||
fieldClass="px-4 transfer-field"
|
fieldClass="px-4"
|
||||||
parentClass="flex items-center gap-1 justify-between"
|
parentClass="flex items-center gap-1 justify-between"
|
||||||
labelClass="flex-[0.2] mb-0 font-semibold"
|
labelClass="flex-[0.2] mb-0 font-semibold"
|
||||||
inputClass="flex-[0.8] transfer-field"
|
inputClass="flex-[0.8]"
|
||||||
inputBg="bg-slate-100"
|
inputBg="bg-slate-100"
|
||||||
label="Introduction: "
|
label="Introduction: "
|
||||||
type="text"
|
type="text"
|
||||||
|
|||||||
@@ -28,14 +28,16 @@ const YourPage = () => {
|
|||||||
let api = new usersService();
|
let api = new usersService();
|
||||||
const res = await api.MyPageIntro(pageValues);
|
const res = await api.MyPageIntro(pageValues);
|
||||||
|
|
||||||
setResponse({
|
setTimeout(() => {
|
||||||
loading: false,
|
setResponse({
|
||||||
data: res.data,
|
loading: false,
|
||||||
msg: "Page updated successfully",
|
data: res.data,
|
||||||
});
|
msg: "Page updated successfully",
|
||||||
|
});
|
||||||
|
|
||||||
// Clear form after successful update
|
// Clear form after successful update
|
||||||
setPageValues({ intro: "", description: "" });
|
setPageValues({ intro: "", description: "" });
|
||||||
|
}, 2000);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setResponse({
|
setResponse({
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user