Remove unnecessary useCallback dependencies

This commit is contained in:
Aurora Lahtela 2023-02-28 20:15:27 +02:00
parent 6b2486f80d
commit 274d99b54d

View File

@ -50,9 +50,9 @@ const GroupVisualizer = ({groups, colors, name, horizontal}) => {
top: "0.5rem"
};
const changeViewToPie = useCallback(() => setVisualization(options.PIE), [setVisualization, options])
const changeViewToTable = useCallback(() => setVisualization(options.TABLE), [setVisualization, options])
const changeViewToBar = useCallback(() => setVisualization(horizontal ? options.BAR : options.COLUMN), [setVisualization, horizontal, options])
const changeViewToPie = useCallback(() => setVisualization(options.PIE), [setVisualization])
const changeViewToTable = useCallback(() => setVisualization(options.TABLE), [setVisualization])
const changeViewToBar = useCallback(() => setVisualization(horizontal ? options.BAR : options.COLUMN), [setVisualization, horizontal])
const fallbackFunction = useCallback((error) => <ErrorViewText error={error}/>, []);