libremesh / lime-app

Geek-free Web App for setup and mantainance of Libremesh nodes built on Preact
https://libremesh.github.io/lime-app/
GNU Affero General Public License v3.0
50 stars 27 forks source link

Sync specific data types #426

Closed selankon closed 2 months ago

selankon commented 2 months ago

This PR refactors a a bit to create a specific package under src/components to handle common tasks for shared state async operations.

It also implements a feature to use shared state synchronization hook to a specific data types. On this way you can specify if you want to publish all, sync, and invalidate queries for specific data types (for example only mesh_upgrade data type)

                <UpdateSharedStateBtn
                    updateOnMount={false}
                    ip={info.node_ip}
                    nodeName={name}
                    types={["mesh_wide_upgrade"]}
                />