Fix Frontend pages tests (#2719)

* Fix Frontend pages tests

Co-authored-by: gitstart-twenty <twenty@gitstart.com>
Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com>

* Add SnackBarDecorator

Co-authored-by: gitstart-twenty <twenty@gitstart.com>
Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com>

* Fix more tests

Co-authored-by: gitstart-twenty <twenty@gitstart.com>
Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com>

* Fix more tests

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: gitstart-twenty <twenty@gitstart.com>
Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com>

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
This commit is contained in:
gitstart-twenty
2023-11-27 15:52:16 +05:45
committed by GitHub
parent f0e20b06df
commit 9648b13703
10 changed files with 72 additions and 28 deletions

View File

@ -34,10 +34,10 @@ export const NameFields = ({
);
const [firstName, setFirstName] = useState(
currentWorkspaceMember?.name.firstName ?? '',
currentWorkspaceMember?.name?.firstName ?? '',
);
const [lastName, setLastName] = useState(
currentWorkspaceMember?.name.lastName ?? '',
currentWorkspaceMember?.name?.lastName ?? '',
);
const { updateOneObject, objectNotFoundInMetadata } =
@ -91,8 +91,8 @@ export const NameFields = ({
}
if (
currentWorkspaceMember.name.firstName !== firstName ||
currentWorkspaceMember.name.lastName !== lastName
currentWorkspaceMember.name?.firstName !== firstName ||
currentWorkspaceMember.name?.lastName !== lastName
) {
debouncedUpdate();
}