Make sure WorkList has access to AppConfig

This commit is contained in:
dannyrb committed 2020-06-16 10:20:03 -04:00
1 parent 6e65e7eaf5
commit c3ecbadbc2
7 files changed
+39 -38

No files matched your search

-17
View File
@@ -1,17 +0,0 @@
import { useCallback, useState } from 'react';
/**
* Implements the state/methods defined in `appConfig.context`.
*/
export const useAppConfig = initialValue => {
const [appConfig, setAppConfig] = useState(initialValue || {});
const setCurrentAppConfig = useCallback(updatedConfig => {
setAppConfig(updatedConfig);
}, []);
return {
appConfig,
setCurrentAppConfig,
};
};