Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(dashboards, pluginInstances, selectedName) => {
if (!selectedName || !dashboards[selectedName]) return null
return flow(
map('plugins', mapPluginInstancesToProps(pluginInstances)),
update('plugins', keyBy('instanceId')),
)(dashboards[selectedName])
},
)
mapValues(pluginInstances[instanceId], 'props', prop =>
prop.type === 'pluginList' ? map(prop, 'value', getPluginInstance) : prop,
)