From 1076c2377c92c0367d506fb6058bef5e005ba36a Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 20 Aug 2024 10:42:20 -0700 Subject: [PATCH] Add proptypes and missing dependency to Register --- Client/src/Pages/Auth/Register/Register.jsx | 31 ++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Client/src/Pages/Auth/Register/Register.jsx b/Client/src/Pages/Auth/Register/Register.jsx index 225fb16f0..046aad64b 100644 --- a/Client/src/Pages/Auth/Register/Register.jsx +++ b/Client/src/Pages/Auth/Register/Register.jsx @@ -69,6 +69,11 @@ const LandingPage = ({ isAdmin, onSignup }) => { ); }; +LandingPage.propTypes = { + isAdmin: PropTypes.bool, + onSignup: PropTypes.func, +}; + /** * Renders the first step of the sign up process. * @@ -152,6 +157,14 @@ const StepOne = ({ form, errors, onSubmit, onChange, onBack }) => { ); }; +StepOne.propTypes = { + form: PropTypes.object, + errors: PropTypes.object, + onSubmit: PropTypes.func, + onChange: PropTypes.func, + onBack: PropTypes.func, +}; + /** * Renders the second step of the sign up process. * @@ -224,6 +237,14 @@ const StepTwo = ({ form, errors, onSubmit, onChange, onBack }) => { ); }; +StepTwo.propTypes = { + form: PropTypes.object, + errors: PropTypes.object, + onSubmit: PropTypes.func, + onChange: PropTypes.func, + onBack: PropTypes.func, +}; + /** * Renders the third step of the sign up process. * @@ -369,6 +390,14 @@ const StepThree = ({ form, errors, onSubmit, onChange, onBack }) => { ); }; +StepThree.propTypes = { + form: PropTypes.object, + errors: PropTypes.object, + onSubmit: PropTypes.func, + onChange: PropTypes.func, + onBack: PropTypes.func, +}; + const Register = ({ isAdmin }) => { const dispatch = useDispatch(); const navigate = useNavigate(); @@ -407,7 +436,7 @@ const Register = ({ isAdmin }) => { } }; fetchInvite(); - }, [token]); + }, [token, form]); /** * Validates the form data against the validation schema.