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

Fixing minor bugs

feature/622
Djordje Mitrovic пре 3 година
родитељ
комит
849b92cd12

+ 5
- 1
src/components/Cards/OfferCard/DeleteOffer/DeleteOffer.js Прегледај датотеку

@@ -19,8 +19,9 @@ import {
import selectedTheme from "../../../../themes";
import { ReactComponent as Category } from "../../../../assets/images/svg/category.svg";
import BackdropComponent from "../../../MUI/BackdropComponent";
import { useDispatch } from "react-redux";
import { useDispatch, useSelector } from "react-redux";
import {
fetchOffers,
fetchProfileOffers,
removeOffer,
} from "../../../../store/actions/offers/offersActions";
@@ -28,10 +29,12 @@ import { useTranslation, Trans } from "react-i18next";
import { useHistory } from "react-router-dom";
import useIsMobile from "../../../../hooks/useIsMobile";
import { getImageUrl, variants } from "../../../../util/helpers/imageUrlGetter";
import { selectQueryString } from "../../../../store/selectors/queryStringSelectors";

const DeleteOffer = (props) => {
const dispatch = useDispatch();
const { t } = useTranslation();
const queryString = useSelector(selectQueryString);
const history = useHistory();
const userId = props.offer.userId;
const { isMobile } = useIsMobile();
@@ -42,6 +45,7 @@ const DeleteOffer = (props) => {

const handleApiResponseSuccess = () => {
dispatch(fetchProfileOffers(userId));
dispatch(fetchOffers({ queryString }));
};

const removeOfferHandler = () => {

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

@@ -9,7 +9,10 @@ import {

const ItemDetailsLayout = (props) => {
return (
<ItemDetailsLayoutContainer singleOffer={props.singleOffer}>
<ItemDetailsLayoutContainer
singleOffer={props.singleOffer}
profile={props.profile}
>
{props.children}
<ContentRightCardContainer>
<Content item>{props.content}</Content>

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

@@ -12,11 +12,11 @@ export const ItemDetailsLayoutContainer = styled(Container)`
/* flex: 1; */
height: 100%;
@media (max-width: 1200px) {
padding-right: 36px;
padding-right: ${(props) => (props.profile ? 0 : "36px")};
}
@media (max-width: 600px) {
padding-left: 18px;
padding-right: 18px;
padding-right: ${(props) => (props.profile ? 0 : "18px")};
}
`;

@@ -32,10 +32,11 @@ export const RightCard = styled(Grid)`
margin-top: 0;
margin-left: 0;
padding-left: 0;
${(props) => props.profile && `min-width: 350px;`}

@media screen and (min-width: 600px) {
margin-top: 34px;
margin-left: ${props => props.profile ? "0" : "36px"};
margin-left: ${(props) => (props.profile ? "0" : "36px")};
padding-left: ${(props) => (props.singleOffer ? "36px" : 0)};
border-top-right-radius: 4px;
${(props) => props.singleOffer && `width: 100%`}

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