|
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 | |
|---|
| 1 | import {Grid} from "@mui/material";
|
|---|
| 2 | import RestoranCard from "../../components/cards/restoran-card";
|
|---|
| 3 | import {Link, useLoaderData} from "react-router-dom";
|
|---|
| 4 | const 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 | }
|
|---|
| 19 | export default RestorantsPage;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.