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

added user reviews to offer page

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

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

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

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

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

@@ -4,10 +4,6 @@ import { List, Box } from "@mui/material";

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


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

@@ -7,7 +7,7 @@ const ItemDetailsLayout = (props) => {
return (
<ItemDetailsLayoutContainer>
{props.children}
<Grid container maxHeight="xl">
<Grid container maxHeight="xl" spacing={2}>
<Content item xs={10} lg={9} xl={9.6} md={8} >
{props.content}
</Content>

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

@@ -9,6 +9,7 @@ import { useHistory } from "react-router-dom";
import { setFilters } from "../../store/actions/filters/filtersActions";
import ItemDetails from "../../components/ItemDetails/ItemDetails";
import ItemDetailsLayout from "../../layouts/ItemDetailsLayout/ItemDetailsLayout";
import UserReviewsCard from "../../components/UserReviewsCard/UserReviewsCard";

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

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

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