Skip to content

Commit

Permalink
Merge pull request #309 from sharemindteam/dev
Browse files Browse the repository at this point in the history
[0624 배포]
  • Loading branch information
rmdnps10 authored Jun 24, 2024
2 parents 35fb101 + 0e3f439 commit 48f20d2
Show file tree
Hide file tree
Showing 24 changed files with 282 additions and 357 deletions.
3 changes: 2 additions & 1 deletion src/App.Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ const AppLayout = ({ children }: AppLayoutProps) => {
onClick={() => {
navigate('/service');
}}
style={{ cursor: 'pointer' }}
/>
</ButtonWrapper>
</BottomGreenBox>
</LeftSection>
<div style={{ flex: 1 }}>{children}</div>
<div>{children}</div>
<RightSection>
<BottomGreenBox />
</RightSection>
Expand Down
6 changes: 3 additions & 3 deletions src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { BuyerConsultRequest } from 'pages/Buyer/BuyerConsultRequest';
import { BuyerPaymentDetail } from 'pages/Buyer/BuyerPaymentDetail';
import { BuyerPaymentComplete } from 'pages/Buyer/BuyerPaymentComplete';
import SellerAccountSetting from 'pages/Seller/SellerAccountSetting';
import SellerRefundBankAccount from 'pages/Seller/SellerRefundBankAccount';
import { SellerPwChange } from 'pages/Seller/SellerPwChange';
import { SellerTerminate } from 'pages/Seller/SellerTerminate';
import { SellerLogout } from 'pages/Seller/SellerLogout';
Expand All @@ -53,6 +52,7 @@ import BuyerOpenConsultDetail from 'pages/Buyer/BuyerOpenConsultDetail';
import BuyerFinishPayment from 'pages/Buyer/BuyerFinishPayment';
import BuyerOpenConsultLikes from 'pages/Buyer/BuyerOpenConsultLikes';
import BuyerOpenConsultRecents from 'pages/Buyer/BuyerOpenConsultRecents';
import SellerProfitBankAccount from 'pages/Seller/SellerProfitBankAccount';

const Router = () => {
return (
Expand Down Expand Up @@ -117,8 +117,8 @@ const Router = () => {
element={<SellerPwChange />}
/>
<Route
path="/minder/refundBankAccount"
element={<SellerRefundBankAccount />}
path="/minder/profitBankAccount"
element={<SellerProfitBankAccount />}
/>
<Route path="/minder/setting/terminate" element={<SellerTerminate />} />
<Route path="/minder/setting/logout" element={<SellerLogout />} />
Expand Down
50 changes: 9 additions & 41 deletions src/assets/icons/graphic-noting.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/assets/icons/icon-heart2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/assets/icons/icon-save1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/icons/icon-save2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions src/assets/icons/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import { ReadyConsultCard } from '../Common/ReadyConsultCard';
import { SearchResultData } from 'utils/type';
import { AppendCategoryType } from 'utils/AppendCategoryType';
import { consultStyleToCharNum } from 'utils/convertStringToCharNum';
//
//
//
interface AvailCounselorSearchResultsProps {
searchData: SearchResultData[];
}

//
//
//임의로 ConsultInReady 그대로 사용
export const AvailCounselorSearchResults = ({
searchData,
Expand All @@ -29,6 +33,7 @@ export const AvailCounselorSearchResults = ({
nickname={value.nickname}
level={value.level}
isWishList={value.isWishList}
totalConsult={value.totalConsult}
rating={value.ratingAverage}
totalReview={value.totalReview}
consultType={value.consultTypes}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const CategorySearchResults = ({
consultType={value.consultTypes}
letterPrice={value.consultCosts.편지}
chattingPrice={value.consultCosts.채팅}
totalConsult={value.totalConsult}
/>
);
})}
Expand Down
111 changes: 47 additions & 64 deletions src/components/Buyer/BuyerConsult/BuyerOpenConsultSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useMemo } from 'react';
import { useRecoilValue } from 'recoil';
import styled from 'styled-components';
import { Grey1, Grey2, Grey3, White } from 'styles/color';
import { Body1, Body3, Caption1, Heading } from 'styles/font';
import { Body1, Body2, Body3, Caption1, Heading } from 'styles/font';
import { LoadingSpinner } from 'utils/LoadingSpinner';
import { isBuyPopupOpenState } from 'utils/atom';
import { ReactComponent as LockIcon } from 'assets/icons/icon-lock.svg';
Expand All @@ -20,6 +20,7 @@ import { ReactComponent as Empty } from 'assets/icons/graphic-noting.svg';
import { getPostsCutsomers } from 'api/get';
import { useInfiniteQuery } from '@tanstack/react-query';
import useInfiniteObserver from 'hooks/useInfiniteObserver';
import { Flex } from 'components/Common/Flex';

//
//
Expand Down Expand Up @@ -105,47 +106,54 @@ function BuyerOpenConsultSection({ isChecked }: BuyerOpenConsultSectionProps) {

return (
<>
{isLoading ? (
<div
style={{
height: 'calc(70vh)',
display: 'flex',
alignItems: 'center',
}}
>
<LoadingSpinner />
</div>
) : (
<BuyerOpenConsultCardList>
{/* 상담카드 부분 */}
{openConsultList.length === 0 ? (
<EmptyWrapper>
<EmptyIcon />
<Heading>아직 진행한 상담이 없어요</Heading>
</EmptyWrapper>
) : (
openConsultList?.map((item) => {
{
isLoading ? (
<div
style={{
height: 'calc(70vh)',
display: 'flex',
alignItems: 'center',
}}
>
<LoadingSpinner />
</div>
) : // 상담카드 부분
openConsultList.length === 0 ? (
<EmptyWrapper>
<EmptyIcon />
<Heading>아직 진행한 상담이 없어요</Heading>
<Space height="1rem" />
<Body2>상담은 공개상담 탭에서 신청할 수 있어요.</Body2>
</EmptyWrapper>
) : (
<BuyerOpenConsultCardList>
{openConsultList?.map((item) => {
if (item.title === null) {
return (
<BuyerPendingOpenConsultCard key={item.postId}>
<Body1>
{item.isCompleted === null
? '상담 글을 작성해주세요!'
: '임시저장된 글입니다.'}
</Body1>
<Body3>
<Flex className="row-1" justify="space-between">
<Body1>
{item.isCompleted === null
? '상담 글을 작성해주세요!'
: '임시저장된 글입니다.'}
</Body1>
<Caption1 color={Grey3}>{item.updatedAt}</Caption1>
</Flex>

<Body3 color={Grey2}>
{item.isCompleted === null
? '결제 후 작성전'
? '공개상담을 결제한 후 아직 글을 작성하지 않으셨어요. 구매 후 24시간이 지나면 자동으로 환불이 진행됩니다.'
: '이어서 작성하기'}
</Body3>
<Button
text={
item.isCompleted === null
? '상담 글 작성하기'
? '작성하기'
: '이어서 작성하기'
}
width="100%"
height="4rem"
height="4.4rem"
buttonTextType={2}
onClick={() => {
navigate(`/writeOpenConsult/${item.postId}`);
}}
Expand Down Expand Up @@ -178,12 +186,10 @@ function BuyerOpenConsultSection({ isChecked }: BuyerOpenConsultSectionProps) {
) : (
<HeartEmptyIcon />
)}

<Caption1 color={Grey2}>{item?.totalLike}</Caption1>
</IconItem>
<IconItem>
{item?.isScrapped ? <SaveIcon /> : <SaveEmptyIcon />}

<Caption1 color={Grey2}>{item?.totalScrap}</Caption1>
</IconItem>
<IconItem>
Expand All @@ -195,13 +201,13 @@ function BuyerOpenConsultSection({ isChecked }: BuyerOpenConsultSectionProps) {
</BuyerOpenConsultCard>
);
}
})
)}
{/* 상담카드 부분 */}
{/* 마지막 요소가 가려지지 않도록 마진 영역을 추가 */}
<Space height="4rem" />
</BuyerOpenConsultCardList>
)}
})}
</BuyerOpenConsultCardList>
)
// 상담카드 부분 끝
}
{/* 마지막 요소가 가려지지 않도록 마진 영역을 추가 */}
<Space height="4rem" />

<div ref={observerElem} />

Expand All @@ -211,16 +217,6 @@ function BuyerOpenConsultSection({ isChecked }: BuyerOpenConsultSectionProps) {
<IsBuyPopup />
</>
)}
<CreateConsultButtonWrapper>
<Button
text="공개상담 신청하기"
width="100%"
height="5.2rem"
onClick={() => {
navigate('/openConsultRequest');
}}
/>
</CreateConsultButtonWrapper>
</>
);
}
Expand All @@ -243,7 +239,7 @@ const BuyerPendingOpenConsultCard = styled.div`
flex-direction: column;
box-sizing: border-box;
padding: 1.6rem;
gap: 0.8rem;
gap: 1.4rem;
position: relative;
background-color: ${White};
border-radius: 1.2rem;
Expand Down Expand Up @@ -314,24 +310,11 @@ const TimeLeft = styled.div`
right: 1.6rem;
`;

const CreateConsultButtonWrapper = styled.div`
width: 100%;
padding: 0 2rem;
box-sizing: border-box;
display: flex;
position: fixed;
bottom: 1.5rem;
flex-direction: column;
@media (min-width: 768px) {
width: 375px;
}
`;

const EmptyIcon = styled(Empty)`
padding: 4.7rem 4.41rem 4.603rem 4.5rem;
`;
const EmptyWrapper = styled.div`
margin: 10vh auto 0px;
margin: calc(10vh - 1px) auto 0px;
display: flex;
flex-direction: column;
align-items: center;
Expand Down
12 changes: 6 additions & 6 deletions src/components/Buyer/BuyerCounselorProfile/CounselorFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,22 @@ const Wrapper = styled.div`
}
display: flex;
justify-content: center;
align-items: center;
gap: 2rem;
background-color: ${White};
padding: 0.8rem 2rem 1.2rem 2rem;
position: fixed;
bottom: 0;
z-index: 999;
box-shadow: 0px -2px 10px 0px rgba(0, 0, 0, 0.1);
`;
const NoneBookMarkIcon = styled(NoneBookMark)`
width: 4.2rem;
height: 3.9rem;
width: 2.8rem;
height: 2.8rem;
cursor: pointer;
margin-top: 0.5rem;
`;
const BookMarkIcon = styled(BookMark)`
width: 4.2rem;
height: 3.9rem;
width: 2.8rem;
height: 2.8rem;
cursor: pointer;
margin-top: 0.5rem;
`;
Loading

0 comments on commit 48f20d2

Please sign in to comment.