Browse Source

Initial commit

feature/587
jovan.cirkovic 3 years ago
parent
commit
96934c0138

+ 2
- 3
src/components/ItemDetails/ItemDetailsHeaderCard/ItemDetailsHeaderCard.js View File

@@ -53,8 +53,8 @@ const ItemDetailsHeaderCard = (props) => {
<OfferTitle isMyProfile={props.isMyProfile} onClick={handleGoProfile}>
{offer?.companyData?.company?.name}
</OfferTitle>
<PIBDetail offer={props.offer} isMyProfile={props.isMyProfile}/>
<CategoryDetail offer={props.offer} isMyProfile={props.isMyProfile}/>
<PIBDetail offer={props.offer} isMyProfile={props.isMyProfile} />
<CategoryDetail offer={props.offer} isMyProfile={props.isMyProfile} />
</OfferDetails>
{props.isMyProfile ? (
<UserIconContainer onClick={handleGoProfile}>
@@ -67,7 +67,6 @@ const ItemDetailsHeaderCard = (props) => {
)}
</HeaderTop>
<StatisticDetails offer={offer} />
</ItemDetailsHeaderContainer>
);
};

+ 12
- 12
src/components/ItemDetails/ItemDetailsHeaderCard/ItemDetailsHeaderCard.styled.js View File

@@ -3,8 +3,7 @@ import styled from "styled-components";
import selectedTheme from "../../../themes";
import { IconButton } from "../../Buttons/IconButton/IconButton";
import { PrimaryButton } from "../../Buttons/PrimaryButton/PrimaryButton";
import { ReactComponent as User} from "../../../assets/images/svg/user.svg";

import { ReactComponent as User } from "../../../assets/images/svg/user.svg";

export const ItemDetailsHeaderContainer = styled(Box)`
display: flex;
@@ -13,9 +12,7 @@ export const ItemDetailsHeaderContainer = styled(Box)`
box-sizing: border-box;
margin: 10px 0;
background-color: ${(props) =>
props.isMyProfile
? selectedTheme.primaryPurple
: "white"};
props.isMyProfile ? selectedTheme.primaryPurple : "white"};
border-radius: 4px;
border: 1px solid ${selectedTheme.primaryPurple};
max-width: 2000px;
@@ -46,7 +43,10 @@ export const OfferInfo = styled(Box)`
export const OfferTitle = styled(Typography)`
margin-bottom: 12px;
font-family: "Open Sans";
color: ${props => props.isMyProfile ? selectedTheme.primaryYellow : selectedTheme.primaryPurple};
color: ${(props) =>
props.isMyProfile
? selectedTheme.primaryYellow
: selectedTheme.primaryPurple};
font-weight: 700;
font-size: 24px;
cursor: pointer;
@@ -73,7 +73,10 @@ export const OfferLocation = styled(Box)`
`;
export const OfferPIB = styled(Box)`
font-family: "Open Sans";
color: ${props => props.isMyProfile ? selectedTheme.primaryDarkTextThird : selectedTheme.primaryText};
color: ${(props) =>
props.isMyProfile
? selectedTheme.primaryDarkTextThird
: selectedTheme.primaryText};
line-height: 16px;
font-size: 12px;
`;
@@ -82,7 +85,6 @@ export const OfferDetails = styled(Box)`
flex-direction: column;
flex-wrap: ${(props) => (!props.halfwidth ? "no-wrap" : "wrap")};
justify-content: start;
`;

export const OfferCategory = styled(Box)`
@@ -171,7 +173,5 @@ export const MessageIcon = styled(IconButton)`
`;
export const UserIconContainer = styled(MessageIcon)`
background-color: ${selectedTheme.primaryIconBackgroundColor};
`
export const UserIcon = styled(User)`
`
`;
export const UserIcon = styled(User)``;

+ 1
- 2
src/layouts/ItemDetailsLayout/ItemDetailsLayout.styled.js View File

@@ -25,5 +25,4 @@ export const RightCard = styled(Grid)`
border-top-right-radius: 4px;
width: 100%;
`;
export const Content = styled(Grid)`
`;
export const Content = styled(Grid)``;

+ 7
- 7
src/request/jsonServerRequest.js View File

@@ -1,13 +1,13 @@
import axios from 'axios';
import axios from "axios";

const JSON_SERVER_ENDPOINT = 'http://localhost:4000';
const JSON_SERVER_ENDPOINT = "http://localhost:4000";

const request = axios.create({
baseURL: JSON_SERVER_ENDPOINT,
headers: {
'Content-Type': 'application/json',
},
baseURL: JSON_SERVER_ENDPOINT,
headers: {
"Content-Type": "application/json",
},
});

export const getRequest = (url, params = null, options = null) =>
request.get(url, { params, ...options });
request.get(url, { params, ...options });

+ 1
- 1
src/store/middleware/accessTokensMiddleware.js View File

@@ -43,7 +43,7 @@ export default ({ dispatch }) =>
token: refresh,
});
const newToken = axiosResponse.data.token;
response.headers.Authorization = `Bearer ${newToken}`
response.headers.Authorization = `Bearer ${newToken}`;
dispatch(refreshUserToken(newToken));
}


Loading…
Cancel
Save