Open joelvdavies opened 8 months ago
This is fine however it makes the code less readable.
This is fine however it makes the code less readable.
Yeah I can see that as well, although it does also reduce the number of react components it tries to render. Perhaps just combining the save as and edit would work nicer, at least then you don't have the nasty line above getting the type passed to the dialog to ignore the delete one.
Yeah it something to think about after MVP has been delivered
I think we can combine the deleteCategoryDialogOpen, saveAs, edit react states and use a single one e.g. https://github.com/ral-facilities/inventory-management-system/blob/94d9ff67eb418659c64590155c7f8f4c4c054f07/src/systems/systems.component.tsx#L239-L242. (May also be able to use a single instance of the dialog as well https://github.com/ral-facilities/inventory-management-system/blob/94d9ff67eb418659c64590155c7f8f4c4c054f07/src/systems/systems.component.tsx#L392-L407)