Improve usability and efficiency

Allow "saving" a set with no changes
Update cleanseVocabString function to be inline with Cloud Function
Combine CreateSet and EditSet components
Remove redundancy and significantly improve efficiency in the EditSet component
This commit is contained in:
2022-02-22 14:48:31 +00:00
parent 8dc5db3fa5
commit 22ea9bcccf
4 changed files with 170 additions and 453 deletions

View File

@@ -318,13 +318,13 @@ class App extends React.Component {
}
</Route>
<Route path="/create-set" exact>
<CreateSet db={db} user={this.state.user} logEvent={analytics.logEvent} page={this.page} />
<EditSet db={db} user={this.state.user} logEvent={analytics.logEvent} page={this.page} createSet={true} />
</Route>
<Route path="/my-sets" exact>
<UserSets db={db} functions={functions} user={this.state.user} logEvent={analytics.logEvent} page={this.page} />
</Route>
<Route path="/sets/:setId/edit" exact>
<EditSet db={db} user={this.state.user} logEvent={analytics.logEvent} page={this.page} />
<EditSet db={db} user={this.state.user} logEvent={analytics.logEvent} page={this.page} createSet={false} />
</Route>
<Route path="/history" exact>
<History db={db} user={this.state.user} logEvent={analytics.logEvent} page={this.page} />