feat(branches): fix branches provider.

This commit is contained in:
elforjani13
2022-03-10 17:42:31 +02:00
parent c1ad349f6b
commit a75451cee7
2 changed files with 7 additions and 12 deletions

View File

@@ -3,7 +3,6 @@ import intl from 'react-intl-universal';
import BranchesDataTable from './BranchesDataTable';
import BranchesEmptyStatus from './BranchesEmptyStatus';
import { Choose } from 'components';
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
import { useBranchesContext } from './BranchesProvider';
@@ -21,14 +20,9 @@ function Branches({
}, [changePreferencesPageTitle]);
return (
<Choose>
<Choose.When condition={isEmptyStatus}>
<BranchesEmptyStatus />
</Choose.When>
<Choose.Otherwise>
<BranchesDataTable />
</Choose.Otherwise>
</Choose>
<React.Fragment>
{isEmptyStatus ? <BranchesEmptyStatus /> : <BranchesDataTable />}
</React.Fragment>
);
}
export default compose(withDashboardActions)(Branches);