|
Last change
on this file since badbc79 was badbc79, checked in by Luka Cheshlarov <luka.cheshlarov@…>, 20 months ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
642 bytes
|
| Line | |
|---|
| 1 | import {Grid} from "@mui/material";
|
|---|
| 2 | import {useLoaderData} from "react-router-dom";
|
|---|
| 3 | import MenuItemCard from "../../components/cards/menu-item-card";
|
|---|
| 4 |
|
|---|
| 5 | const MenuItemsListPage = () => {
|
|---|
| 6 | const loaderData = useLoaderData();
|
|---|
| 7 | return (
|
|---|
| 8 | <Grid container>
|
|---|
| 9 | {loaderData.menuItems &&
|
|---|
| 10 | loaderData.menuItems.length > 0 &&
|
|---|
| 11 | loaderData.menuItems.map((menuItem) => (
|
|---|
| 12 | <Grid key={menuItem.id} item xs={12} md={6} lg={6}>
|
|---|
| 13 | <MenuItemCard item={menuItem}/>
|
|---|
| 14 | </Grid>
|
|---|
| 15 | ))}
|
|---|
| 16 | </Grid>
|
|---|
| 17 | )
|
|---|
| 18 | }
|
|---|
| 19 | export default MenuItemsListPage;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.