feat(branches& warehouses): fix EmptyStatus.

This commit is contained in:
elforjani13
2022-02-08 16:05:40 +02:00
parent 287939e093
commit 781dd9457e
8 changed files with 58 additions and 36 deletions

View File

@@ -1,5 +1,8 @@
import React from 'react';
import styled from 'styled-components';
import intl from 'react-intl-universal';
import '../../../style/pages/Preferences/warehousesList.scss';
import Warehouses from './Warehouses';
import WarehousesEmptyStatus from './WarehousesEmptyStatus';
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
@@ -18,7 +21,17 @@ function WarehousesList({
// return <WarehousesEmptyStatus />;
// }
return <Warehouses />;
return (
<WarehousesListRoot>
<Warehouses />
</WarehousesListRoot>
);
}
export default compose(withDashboardActions)(WarehousesList);
const WarehousesListRoot = styled.div`
display: flex;
flex-wrap: wrap;
margin: 15px;
`;

View File

@@ -21,14 +21,19 @@ function WarehousesProvider({ ...props }) {
};
return (
<div className={classNames(CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT)}>
<WarehousePreference>
<div
className={classNames(
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT,
CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_WAREHOUSES,
)}
>
<React.Fragment>
{isWarehouesLoading ? (
<PreferencesPageLoader />
) : (
<WarehousesContext.Provider value={provider} {...props} />
)}
</WarehousePreference>
</React.Fragment>
</div>
);
}
@@ -37,8 +42,4 @@ const useWarehousesContext = () => React.useContext(WarehousesContext);
export { WarehousesProvider, useWarehousesContext };
const WarehousePreference = styled.div`
display: flex;
flex-wrap: wrap;
margin: 15px;
`;
const WarehousePreference = styled.div``;