Преглед изворни кода

added user reviews to offer page

pull/5/head
Pavle Golubovic пре 3 година
родитељ
комит
40dd5b5b39

+ 2
- 2
src/components/UserReviewsCard/UserReviewsCard.js Прегледај датотеку

import ThumbUpIcon from "@mui/icons-material/ThumbUp"; import ThumbUpIcon from "@mui/icons-material/ThumbUp";
import ThumbDownIcon from "@mui/icons-material/ThumbDown"; import ThumbDownIcon from "@mui/icons-material/ThumbDown";
import StarBorderIcon from "@mui/icons-material/StarBorder"; import StarBorderIcon from "@mui/icons-material/StarBorder";
import { PRIMARY_PURPLE_COLOR } from "../../constants/stylesConstants";
import selectedTheme from "../../themes";


const UserReviewsCard = (props) => { const UserReviewsCard = (props) => {
var dataMockupdata = JSON.parse(JSON.stringify(Mockupdata)); var dataMockupdata = JSON.parse(JSON.stringify(Mockupdata));
<ListItemAvatar sx={{ mt: 0 }}> <ListItemAvatar sx={{ mt: 0 }}>
<Avatar alt={review.name} src="/static/images/avatar/1.jpg" /> <Avatar alt={review.name} src="/static/images/avatar/1.jpg" />
</ListItemAvatar> </ListItemAvatar>
<Typography sx={{ color: PRIMARY_PURPLE_COLOR }}>
<Typography sx={{ color: selectedTheme.primaryPurple }}>
<b>{review.name}</b> <b>{review.name}</b>
</Typography> </Typography>
</ListItem> </ListItem>

+ 0
- 4
src/components/UserReviewsCard/UserReviewsCard.styled.js Прегледај датотеку



export const ReviewsBox = styledComponents(Box)` export const ReviewsBox = styledComponents(Box)`
width: 100%; width: 100%;
max-width: 360px;
position: fixed;
right: 0;
bottom: 0;
height: calc(100% - 90px); height: calc(100% - 90px);
`; `;



+ 1
- 1
src/layouts/ItemDetailsLayout/ItemDetailsLayout.js Прегледај датотеку

return ( return (
<ItemDetailsLayoutContainer> <ItemDetailsLayoutContainer>
{props.children} {props.children}
<Grid container maxHeight="xl">
<Grid container maxHeight="xl" spacing={2}>
<Content item xs={10} lg={9} xl={9.6} md={8} > <Content item xs={10} lg={9} xl={9.6} md={8} >
{props.content} {props.content}
</Content> </Content>

+ 2
- 1
src/pages/ItemDetailsPage/ItemDetailsPageMUI.js Прегледај датотеку

import { setFilters } from "../../store/actions/filters/filtersActions"; import { setFilters } from "../../store/actions/filters/filtersActions";
import ItemDetails from "../../components/ItemDetails/ItemDetails"; import ItemDetails from "../../components/ItemDetails/ItemDetails";
import ItemDetailsLayout from "../../layouts/ItemDetailsLayout/ItemDetailsLayout"; import ItemDetailsLayout from "../../layouts/ItemDetailsLayout/ItemDetailsLayout";
import UserReviewsCard from "../../components/UserReviewsCard/UserReviewsCard";


const ItemDetailsPage = () => { const ItemDetailsPage = () => {
const dispatch = useDispatch(); const dispatch = useDispatch();
<button onClick={handleCl}>Dugme</button> <button onClick={handleCl}>Dugme</button>
<Navbar /> <Navbar />
{/* right card mora mi bude Review Card */} {/* right card mora mi bude Review Card */}
<ItemDetailsLayout content={<ItemDetails />} />
<ItemDetailsLayout content={<ItemDetails />} rightCard={<UserReviewsCard />} />


{/* <Box sx={{ mt: 4, mx: 4 }}> {/* <Box sx={{ mt: 4, mx: 4 }}>
<GridStyled container justifyContent="space-between"> <GridStyled container justifyContent="space-between">

Loading…
Откажи
Сачувај