mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 01:15:28 +00:00
fix: no client context on ModifyAccount
fix: no reactivity on account settings closes #706 fixes #683 fixes #702
This commit is contained in:
@@ -7,6 +7,8 @@ import { Category, Error, Modal } from "@revoltchat/ui";
|
||||
|
||||
import { noopTrue } from "../../../lib/js";
|
||||
|
||||
import { useApplicationState } from "../../../mobx/State";
|
||||
|
||||
import FormField from "../../../pages/login/FormField";
|
||||
import { AppContext } from "../../revoltjs/RevoltClient";
|
||||
import { takeError } from "../../revoltjs/util";
|
||||
@@ -27,7 +29,7 @@ export default function ModifyAccount({
|
||||
field,
|
||||
...props
|
||||
}: ModalProps<"modify_account">) {
|
||||
const client = useContext(AppContext);
|
||||
const client = useApplicationState().client!;
|
||||
const [processing, setProcessing] = useState(false);
|
||||
const { handleSubmit, register, errors } = useForm<FormInputs>();
|
||||
const [error, setError] = useState<string | undefined>(undefined);
|
||||
|
||||
Reference in New Issue
Block a user