(() => loadCustomTabs());
const refreshTabs = useCallback(() => {
setCustomTabs(loadCustomTabs());
}, []);
useEffect(() => {
refreshTabs();
window.addEventListener('gc-indicator-custom-tabs-changed', refreshTabs);
return () => window.removeEventListener('gc-indicator-custom-tabs-changed', refreshTabs);
}, [refreshTabs]);
if (!onAddMany && !onAdd) return null;
const applyMain = () => {
applyIndicatorTab({ kind: 'main' }, onAddMany, onAdd);
};
const applyCustom = (tab: IndicatorCustomTab) => {
applyIndicatorTab({ kind: 'custom', tab }, onAddMany, onAdd);
};
return (
{customTabs.map(tab => (
))}
);
};
export default IndicatorTabQuickButtons;