p5/8 done
This commit is contained in:
@@ -6,6 +6,7 @@ import Button from '@mui/material/Button';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Box from '@mui/material/Box';
|
||||
import { styled } from '@mui/material/styles';
|
||||
import { Link } from 'react-router-dom';
|
||||
interface ComponentProps {
|
||||
building: {
|
||||
img: string,
|
||||
@@ -13,6 +14,7 @@ interface ComponentProps {
|
||||
description: string[]
|
||||
},
|
||||
cardNum: number;
|
||||
idx: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +25,7 @@ interface ComponentProps {
|
||||
}));
|
||||
|
||||
|
||||
function BuildCard({ building,cardNum} : ComponentProps) {
|
||||
function BuildCard({ building,cardNum,idx} : ComponentProps) {
|
||||
return (
|
||||
<Card style={cardNum%2==0?{'flexDirection':'row-reverse'}:{}}sx={{ display: 'flex' }} >
|
||||
<CardMedia
|
||||
@@ -43,7 +45,7 @@ function BuildCard({ building,cardNum} : ComponentProps) {
|
||||
))}
|
||||
</CardContent>
|
||||
<CardActions sx={{ justifyContent: cardNum%2!=0?'end':"start"}} >
|
||||
<Button size="small">Подробнее</Button>
|
||||
<Link key={cardNum} to={"/building/" + idx}><Button size="small">Подробнее</Button></Link>
|
||||
</CardActions>
|
||||
</Box>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user