import get from 'lodash/get';
import useCurrentPage from '../useCurrentPage';
const useFlatpackConfig = function useFlatpackConfig(config) {
  const currentPage = useCurrentPage();
  const recoilId = get(currentPage, 'metadata.id');
  const providedId = get(config, 'metadata.id');
  return recoilId === providedId ? currentPage : config;
};
export default useFlatpackConfig;