mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Trim data before saving
This commit is contained in:
parent
6e707c623d
commit
fc730244ba
2 changed files with 6 additions and 2 deletions
|
|
@ -131,7 +131,7 @@ export class AuthenticationPageComponent extends Component {
|
|||
|
||||
const handleSubmitSignup = values => {
|
||||
const { fname, lname, ...rest } = values;
|
||||
const params = { firstName: fname, lastName: lname, ...rest };
|
||||
const params = { firstName: fname.trim(), lastName: lname.trim(), ...rest };
|
||||
submitSignup(params);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,11 @@ export class ProfileSettingsPageComponent extends Component {
|
|||
// Ensure that the optional bio is a string
|
||||
const bio = rawBio || '';
|
||||
|
||||
const profile = { firstName, lastName, bio };
|
||||
const profile = {
|
||||
firstName: firstName.trim(),
|
||||
lastName: lastName.trim(),
|
||||
bio: bio.trim(),
|
||||
};
|
||||
const uploadedImage = this.props.image;
|
||||
|
||||
// Update profileImage only if file system has been accessed
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue