source: frontend/src/routes/restourant/restorant-list.jsx@ badbc79

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: 704 bytes
Line 
1import {Grid} from "@mui/material";
2import RestoranCard from "../../components/cards/restoran-card";
3import {Link, useLoaderData} from "react-router-dom";
4const RestorantsPage= () => {
5 const loaderData = useLoaderData();
6 return(
7 <Grid container>
8 {loaderData.restorants &&
9 loaderData.restorants.length > 0 &&
10 loaderData.restorants.map((restoran) => (
11 <Grid key={restoran.id} item xs={12} md={6} lg={4}>
12 <RestoranCard restoran={restoran}/>
13 </Grid>
14 ))}
15 <Link to={"/restorants/create"}>Create </Link>
16 </Grid>
17 )
18}
19export default RestorantsPage;
Note: See TracBrowser for help on using the repository browser.