Set initial sending method

[MAILPOET-2693]
This commit is contained in:
Amine Ben hammou
2020-04-09 08:34:17 +02:00
committed by Veljko V
parent 75ec035cec
commit 4312dd3532
2 changed files with 7 additions and 7 deletions

View File

@@ -1,3 +1,4 @@
import React from 'react';
import { Settings } from '../types';
import useSelector from './useSelector';
import { ValueAndSetter } from './types';
@@ -26,6 +27,6 @@ export function useSetting(...path: string[]): [any, (value: any) => any] {
const setValue = useAction('setSetting');
return [
getValue(path),
(value) => setValue(path, value),
React.useCallback((value) => setValue(path, value), path), // eslint-disable-line
];
}