Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #341

Merged
merged 10 commits into from
Jul 4, 2024
5 changes: 4 additions & 1 deletion src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ const Router = () => {
return (
<Routes>
{/* admin */}
<Route path="/admin" element={<Admin />} />
<Route
path={`/${process.env.REACT_APP_ADMIN_UUID_URL}`}
element={<Admin />}
/>
{/* minder(buyer) */}
<Route path="/share" element={<BuyerHome />} />
<Route path="/" element={<Navigate to="/share" />} />
Expand Down
Binary file added src/assets/logo/beta_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 24 additions & 3 deletions src/components/Common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,37 @@ import styled from 'styled-components';
import { ReactComponent as LogoImg } from 'assets/icons/logo.svg';
import { ReactComponent as Search } from 'assets/icons/search.svg';
import { useNavigate } from 'react-router-dom';

import betaTagImageUrl from 'assets/logo/beta_logo.png';
import { Flex } from './Flex';

//
//
//

interface HeaderProps {
isBuyer: boolean;
onClick?: React.MouseEventHandler<SVGElement>;
}

//
//
//

export const Header = ({ isBuyer, onClick }: HeaderProps) => {
const navigate = useNavigate();

//
//
//

if (isBuyer === true) {
return (
<Wrapper>
<Logo onClick={onClick}></Logo>
<Flex gap="0.8rem" style={{ marginLeft: '2rem' }}>
<Logo onClick={onClick} />
<BetaTagImage src={betaTagImageUrl} />
</Flex>
<StyledSearch
onClick={() => {
if (isBuyer) {
Expand All @@ -37,6 +52,7 @@ export const Header = ({ isBuyer, onClick }: HeaderProps) => {
);
}
};

const Wrapper = styled.header`
width: 100%;
height: 6rem;
Expand All @@ -47,13 +63,18 @@ const Wrapper = styled.header`
top: 0;
z-index: 999;
`;

const Logo = styled(LogoImg)`
margin-left: 2.1rem;
margin-top: 1.4rem;
cursor: pointer;
`;

const StyledSearch = styled(Search)`
margin-top: 1.6rem;
margin-right: 2.17rem;
cursor: pointer;
`;

const BetaTagImage = styled.img`
width: 4.6rem;
height: 2.2rem;
`;
9 changes: 8 additions & 1 deletion src/components/Common/HomeAboutFooterSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ export const HomeAboutFooterSection = ({
</AboutSection>
<Footer>
<FooterLinkList>
<Body3>고객센터</Body3>
<Body3
style={{ cursor: 'pointer' }}
onClick={() => {
window.open(process.env.REACT_APP_TEMP_CUSTOMER_SERVICE_URL);
}}
>
고객센터
</Body3>
<Body3>이용약관</Body3>
<Body3>개인정보처리방침</Body3>
</FooterLinkList>
Expand Down
8 changes: 7 additions & 1 deletion src/components/Common/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ export const Profile = ({
>
서비스 소개
</ServiceItem>
<ServiceItem>정산 문의</ServiceItem>
<ServiceItem
onClick={() => {
window.open(process.env.REACT_APP_TEMP_CUSTOMER_SERVICE_URL);
}}
>
정산 문의
</ServiceItem>
<ServiceItem
onClick={() => {
navigate('/minder/setting');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ export const NoCalculationGraphic = ({ status }: NoCalculationGraphicProps) => {
? '정산 중인 내역이 없어요.'
: '아직 완료된 상담이 없어요.'}
</MainText>
<SubText>
{status === '완료' ? (
<>
수익은 정산 신청일로부터 <br /> 15영업일 이후에 지급되어요.
</>
) : status === '정산 중' ? (
<>
아직 정산 신청을 하지 않은 상담이 있다면 <br /> <b>정산 예정</b>{' '}
탭에서 신청할 수 있어요.
</>
) : (
<>
상담 종료 신청을 보내면 셰어의 확인 없이도 <br />
n일 이내 자동으로 상담이 종료되어요.
</>
)}
</SubText>
</NoCalculationGraphicWrapper>
);
};
Expand All @@ -60,13 +43,3 @@ const MainText = styled.div`
font-weight: 600;
line-height: 3rem;
`;
const SubText = styled.div`
margin-top: 1.2rem;
color: var(--greyscale-grey-1-text, #33333a);
text-align: center;
font-family: Pretendard;
font-size: 1.6rem;
font-style: normal;
font-weight: 400;
line-height: 150%; /* 2.4rem */
`;
7 changes: 6 additions & 1 deletion src/pages/Buyer/BuyerMypage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ export const BuyerMypage = () => {
</div>
{isLogin ? (
<>
<div className="additional-box">
<div
className="additional-box"
onClick={() => {
window.open(process.env.REACT_APP_TEMP_CUSTOMER_SERVICE_URL);
}}
>
<Body2 color={Grey1}>결제 문의</Body2>
</div>
<div className="additional-box">
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Buyer/BuyerOpenPaymentDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export const BuyerOpenPaymentDetail = () => {
try {
const res: any = await postOpenConsult(body);
if (res.status === 201) {
navigate('/paymentComplete');
window.open(process.env.REACT_APP_ONE_TO_MANY_PAYMENT_URL);
navigate('/paymentFinish');
} else if (res?.response.status === 404) {
alert('존재하지 않는 회원입니다.');
}
Expand Down
7 changes: 6 additions & 1 deletion src/pages/Buyer/BuyerPaymentDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export const BuyerPaymentDetail = () => {
totalConsult: 0,
});

const paymentUrl = letterFocus
? process.env.REACT_APP_LETTER_PAYMENT_URL
: process.env.REACT_APP_CHATTING_PAYMENT_URL;

/**
*
*/
Expand All @@ -103,7 +107,8 @@ export const BuyerPaymentDetail = () => {
try {
const res: any = await postConsults(body);
if (res.status === 201) {
navigate('/paymentComplete');
window.open(paymentUrl);
navigate('/paymentFinish');
} else if (res.response.status === 400 || res.response.status === 404) {
const errMessage = res.response.data.message.substring(
0,
Expand Down
4 changes: 4 additions & 0 deletions src/styles/GlobalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ export const GlobalStyle = createGlobalStyle`
a {
text-decoration: none;
}

::selection {
background: #c2f3f0;
}
`;
Loading