mirror of
https://github.com/ajvpot/meshexplorer.git
synced 2026-07-06 01:30:58 +02:00
Merge pull request #3 from bryantkelley/feat/filter-empty-configs
Filter empty meshcoreKeys when closing config popover
This commit is contained in:
@@ -91,7 +91,13 @@ export function ConfigProvider({ children }: { children: ReactNode }) {
|
||||
<MeshcoreKeyModal
|
||||
config={config}
|
||||
setConfig={setConfig}
|
||||
onClose={() => setKeyModalOpen(false)}
|
||||
onClose={() => {
|
||||
setConfig({
|
||||
...config,
|
||||
meshcoreKeys: [...(config.meshcoreKeys?.filter(({channelName, privateKey}) => channelName !== "" || privateKey !== "") || [])],
|
||||
});
|
||||
setKeyModalOpen(false)
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</ConfigContext.Provider>
|
||||
|
||||
Reference in New Issue
Block a user