From ce3be17b744b2ba91e048e5d5dd1ac6f38917dcc Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sun, 26 Dec 2021 23:22:15 +0000 Subject: [PATCH] fix(login): make login form an observer of server config --- src/pages/login/forms/Form.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/login/forms/Form.tsx b/src/pages/login/forms/Form.tsx index 3d3dfcc0..9b4fb066 100644 --- a/src/pages/login/forms/Form.tsx +++ b/src/pages/login/forms/Form.tsx @@ -1,4 +1,5 @@ import { CheckCircle, Envelope } from "@styled-icons/boxicons-regular"; +import { observer } from "mobx-react-lite"; import { useForm } from "react-hook-form"; import { Link } from "react-router-dom"; @@ -45,7 +46,7 @@ interface FormInputs { invite: string; } -export function Form({ page, callback }: Props) { +export const Form = observer(({ page, callback }: Props) => { const configuration = useApplicationState().config.get(); const [loading, setLoading] = useState(false); @@ -253,4 +254,4 @@ export function Form({ page, callback }: Props) { )} ); -} +});