diff --git a/src/containers/Preferences/Branches/Branches.js b/src/containers/Preferences/Branches/Branches.js
index 281f6a4e7..0a71ff687 100644
--- a/src/containers/Preferences/Branches/Branches.js
+++ b/src/containers/Preferences/Branches/Branches.js
@@ -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 (
-
-
-
-
-
-
-
-
+
+ {isEmptyStatus ? : }
+
);
}
export default compose(withDashboardActions)(Branches);
diff --git a/src/containers/Preferences/Branches/BranchesProvider.js b/src/containers/Preferences/Branches/BranchesProvider.js
index 43256b0d9..98aa23569 100644
--- a/src/containers/Preferences/Branches/BranchesProvider.js
+++ b/src/containers/Preferences/Branches/BranchesProvider.js
@@ -11,7 +11,7 @@ const BranchesContext = React.createContext();
/**
* Branches data provider.
*/
-function BranchesProvider({ ...props }) {
+function BranchesProvider({ query, ...props }) {
// Features guard.
const { featureCan } = useFeatureCan();
@@ -22,10 +22,11 @@ function BranchesProvider({ ...props }) {
isLoading: isBranchesLoading,
isFetching: isBranchesFetching,
data: branches,
- } = useBranches({}, { enabled: isBranchFeatureCan });
+ } = useBranches(query, { enabled: isBranchFeatureCan });
// Detarmines the datatable empty status.
- const isEmptyStatus = isEmpty(branches) || !isBranchFeatureCan;
+ const isEmptyStatus =
+ (isEmpty(branches) && !isBranchesLoading) || !isBranchFeatureCan;
// Provider state.
const provider = {