Move icons fetching to SWR
Aimed at a proof-of-concept thing but it felt so nicer that I think we can merge it in the end.
The refactoring is in separate steps that should be self-explanatory from the commits. There is just the use of Suspense
(that felt more natural than a isLoading
boolean) that requires a few refactorings:
- Extraction of the control to set the icon in
FormDialog
in its own component - Extraction of the icon in
Node
andAddNodes
in separate components
I may need to add an ErrorBoundary
as well (to be discussed with @bocciare).
EDIT: Added in last commit
Edited by Loic Huder