Fixed: warehouse null check

This commit is contained in:
Llewellyn D'souza
2022-02-04 13:25:41 +05:30
parent 5857706e89
commit be26d80906
2 changed files with 24 additions and 23 deletions

View File

@@ -48,27 +48,28 @@ export default function TileBasic({ tiles }) {
<>
<MDBox px={2} py={3}>
<Grid container spacing={2}>
{tiles.map((items) => (
<>
<Grid item xs={12} sm={6} md={tiles.length > 4 ? 4 : 6}>
<Link to={items.path}>
<MDBox
key={items.name + items.path}
data={{ name: items.name, path: items.path }}
className={classes.centerContent}
sx={{
height: 230,
backgroundColor: ({ palette: { white } }) => white.main,
padding: '32px 40px'
}}
>
{items.icon}
{items.name}
</MDBox>
</Link>
</Grid>
</>
))}
{tiles &&
tiles.map((items) => (
<>
<Grid item xs={12} sm={6} md={tiles.length > 4 ? 4 : 6}>
<Link to={items.path}>
<MDBox
key={items.name + items.path}
data={{ name: items.name, path: items.path }}
className={classes.centerContent}
sx={{
height: 230,
backgroundColor: ({ palette: { white } }) => white.main,
padding: '32px 40px'
}}
>
{items.icon}
{items.name}
</MDBox>
</Link>
</Grid>
</>
))}
</Grid>
</MDBox>
</>

View File

@@ -16,7 +16,7 @@ export default WarehouseActions;
/* ------------- Initial State ------------- */
export const INITIAL_STATE = Immutable({
warehouseDetail: null,
warehouseDetail: [],
error: {}
});