Fixed: warehouse null check
This commit is contained in:
@@ -48,27 +48,28 @@ export default function TileBasic({ tiles }) {
|
|||||||
<>
|
<>
|
||||||
<MDBox px={2} py={3}>
|
<MDBox px={2} py={3}>
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
{tiles.map((items) => (
|
{tiles &&
|
||||||
<>
|
tiles.map((items) => (
|
||||||
<Grid item xs={12} sm={6} md={tiles.length > 4 ? 4 : 6}>
|
<>
|
||||||
<Link to={items.path}>
|
<Grid item xs={12} sm={6} md={tiles.length > 4 ? 4 : 6}>
|
||||||
<MDBox
|
<Link to={items.path}>
|
||||||
key={items.name + items.path}
|
<MDBox
|
||||||
data={{ name: items.name, path: items.path }}
|
key={items.name + items.path}
|
||||||
className={classes.centerContent}
|
data={{ name: items.name, path: items.path }}
|
||||||
sx={{
|
className={classes.centerContent}
|
||||||
height: 230,
|
sx={{
|
||||||
backgroundColor: ({ palette: { white } }) => white.main,
|
height: 230,
|
||||||
padding: '32px 40px'
|
backgroundColor: ({ palette: { white } }) => white.main,
|
||||||
}}
|
padding: '32px 40px'
|
||||||
>
|
}}
|
||||||
{items.icon}
|
>
|
||||||
{items.name}
|
{items.icon}
|
||||||
</MDBox>
|
{items.name}
|
||||||
</Link>
|
</MDBox>
|
||||||
</Grid>
|
</Link>
|
||||||
</>
|
</Grid>
|
||||||
))}
|
</>
|
||||||
|
))}
|
||||||
</Grid>
|
</Grid>
|
||||||
</MDBox>
|
</MDBox>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default WarehouseActions;
|
|||||||
|
|
||||||
/* ------------- Initial State ------------- */
|
/* ------------- Initial State ------------- */
|
||||||
export const INITIAL_STATE = Immutable({
|
export const INITIAL_STATE = Immutable({
|
||||||
warehouseDetail: null,
|
warehouseDetail: [],
|
||||||
error: {}
|
error: {}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user