芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/resources/js/Admin/Pages/Profile/Profile.jsx
import AdminLayouts from "@/Admin/Layouts/AdminLayouts"; import { Head, router, useForm, usePage } from "@inertiajs/react"; import { IonIcon } from "@ionic/react"; import { key, newspaperOutline, people } from "ionicons/icons"; import TextInput from "@/Admin/Components/Inputs/TextInput"; export default function Profile() { const { auth } = usePage().props; const { data, setData, errors, put } = useForm(auth.user); const { data: password, setData: setPassword, errors: passwordError, put: passwordPut, reset, } = useForm({ old_password: "", password: "", password_confirmation: "", }); // handle update profile const handleUpdateProfile = (e) => { e.preventDefault(); put(route("admin.profile")); }; // handle update password const handleUpdatePassword = (e) => { e.preventDefault(); passwordPut(route("admin.change.password"), { onSuccess: () => { reset("old_password", "password", "password_confirmation"); }, }); }; return (
Profile
Profile info
setData("name", e.target.value) } />
setData("email", e.target.value) } />
setData("about", e.target.value) } />
You can change your profile from{" "}
here.
Update
Update password
setPassword("old_password", e.target.value) } />
setPassword("password", e.target.value) } />
setPassword( "password_confirmation", e.target.value ) } />
Update
{/* .yoo-card */}
); }