Merge pull request #3 from bryantkelley/feat/filter-empty-configs

Filter empty meshcoreKeys when closing config popover
This commit is contained in:
Alex Vanderpot
2025-08-01 22:54:45 -07:00
committed by GitHub
+7 -1
View File
@@ -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>