groups: trim name on create

This commit is contained in:
Tyler Brown Cifu Shuster 2020-08-23 19:50:18 -07:00
parent 94151b4a8f
commit 16868c58c9

View File

@ -103,7 +103,7 @@ export class NewScreen extends Component<NewScreenProps, NewScreenState> {
},
};
const { groupName } = this.state;
const groupName = this.state.groupName.trim();
this.setState(
{
invites: { ships: [], groups: [] },
@ -115,7 +115,7 @@ export class NewScreen extends Component<NewScreenProps, NewScreenState> {
.then(() => {
this.setState({ awaiting: false });
props.history.push(
`/~groups/ship/~${window.ship}/${state.groupName}`
`/~groups/ship/~${window.ship}/${groupName}`
);
});
}