teableio/teable

View on GitHub
plugins/src/app/chart/hooks/useUIConfig.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { useContext, useMemo } from 'react';
import { ChartContext } from '../components/ChartProvider';

export const useUIConfig = () => {
  const { uiConfig } = useContext(ChartContext);
  return useMemo(() => uiConfig ?? {}, [uiConfig]);
};