Allow setting modal properties when using SearchModal. Will be used in following diffs.
Details
All modals should work as before. Can be tested after next diff in stack.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Looks really nice!
web/modals/modal.react.js | ||
---|---|---|
10–16 | I think we should split this type into two parts: with overridable and non-overridable props. The second category contains only children. Currently we replace it with +children: (searchText: string) => React.Node, but it would be cleaner to not include it in ModalProps - it will make this code more maintainable. | |
18 | We usually try not to mix default and named exports. This component already had this issue, but we can easily fix that |
web/modals/modal.react.js | ||
---|---|---|
18 |
|
Instead of two separate (action === 'edit_role') blocks, could we merge the two?
We could move await dbQuery(query); within both the (action === 'create_role') (line 139) and else if (action === 'edit_role') (line 144) blocks?
Not a huge deal, whatever you prefer