mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
11 lines
321 B
TypeScript
11 lines
321 B
TypeScript
|
import { PluginStates, utils as pluginUtils } from '@joplin/lib/services/plugins/reducer';
|
||
|
import { useMemo } from 'react';
|
||
|
|
||
|
const useViewInfos = (pluginStates: PluginStates) => {
|
||
|
return useMemo(() => {
|
||
|
return pluginUtils.viewInfosByType(pluginStates, 'webview');
|
||
|
}, [pluginStates]);
|
||
|
};
|
||
|
|
||
|
export default useViewInfos;
|