Skip to content

Commit

Permalink
[Fix/#287] 기능 QA (#289)
Browse files Browse the repository at this point in the history
* fix: 기능 qa 반영

* fix: 클래스 뷰 리뷰 탭 suspense 수정

* fix: 리뷰 쓰기 버튼 클릭 시 라우팅 수정

* fix: 클래스 뷰 탭 height 수정

* fix: line-height 삭제
  • Loading branch information
thisishwarang authored Sep 15, 2024
1 parent 180c632 commit 71028e7
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
File renamed without changes
2 changes: 0 additions & 2 deletions src/pages/class/components/HostInfoCard/HostInfoCard.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ export const hostNameStyle = (theme: Theme) => css`
export const hostKeywordStyle = (theme: Theme) => css`
color: ${theme.color.purple2};
${theme.font['body03-r-12']};
line-height: 140%;
`;

export const hostDescriptionWrapper = (theme: Theme) => css`
color: ${theme.color.midgray2};
${theme.font['body03-r-12']};
line-height: 140%;
display: -webkit-box;
-webkit-line-clamp: 2;
Expand Down
2 changes: 2 additions & 0 deletions src/pages/class/page/Class/Class.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export const tabButtonStyle = (isSelected: boolean) => (theme: Theme) => css`

export const tabSectionStyle = (theme: Theme) => css`
background-color: ${theme.color.bg_white0};
width: 100%;
min-height: 75rem;
padding: 2.8rem 2rem;
`;

Expand Down
17 changes: 8 additions & 9 deletions src/pages/class/page/Class/Class.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useAtom } from 'jotai';
import { useState } from 'react';
import { Suspense, useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { Pagination } from 'swiper/modules';
import { Swiper, SwiperSlide } from 'swiper/react';
Expand Down Expand Up @@ -64,9 +64,7 @@ const Class = () => {
const { data: moimDescription, isLoading: isMoimDescriptionLoading } = useFetchMoimDescription(
moimId ?? ''
);
const { data: moimNoticeList, isLoading: isMoimNoticeListLoading } = useFetchMoimNoticeList(
moimId ?? ''
);
const { data: moimNoticeList } = useFetchMoimNoticeList(moimId ?? '');
if (isMoimDetailLoading || isMoimDescriptionLoading) {
return <Spinner />;
}
Expand Down Expand Up @@ -100,7 +98,6 @@ const Class = () => {
showToast();
}
};

return (
<div>
<LogoHeader />
Expand Down Expand Up @@ -161,14 +158,16 @@ const Class = () => {
<section css={[tabSectionStyle, selectTab === '클래스소개' && infoSectionStyle]}>
{selectTab === '클래스소개' && <ClassInfo content={moimDescription ?? ''} />}
{selectTab === '공지사항' &&
(isMoimNoticeListLoading ? (
<Spinner variant="component" />
) : (moimNoticeList || []).length === 0 ? (
((moimNoticeList || []).length === 0 ? (
<ClassNoticeEmptyView />
) : (
<ClassNotice noticeData={moimNoticeList || []} moimId={moimId ?? ''} />
))}
{selectTab === '리뷰' && <ClassReviewTab moimId={moimId ?? ''} />}
{selectTab === '리뷰' && (
<Suspense fallback={<Spinner />}>
<ClassReviewTab moimId={moimId ?? ''} />
</Suspense>
)}
</section>
{selectTab === '공지사항' && moimDetail?.hostId === hostId && (
<div
Expand Down
5 changes: 4 additions & 1 deletion src/pages/guest/components/MoimCard/MoimCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ const MoimCard = ({ guestMyClassData }: MoimCardProps) => {
const handleCardClick = () => {
navigate(`/class/${moimId}`);
};
const handleWriteReviewClick = () => {
navigate(`/mypage/guest/myclass/${moimId}/review/write`);
};

return (
<div css={moimCardLayout}>
Expand Down Expand Up @@ -81,7 +84,7 @@ const MoimCard = ({ guestMyClassData }: MoimCardProps) => {
</Button>
) : null}
{moimSubmissionState === 'completed' && (
<Button variant="xSmall" onClick={handleButtonClick}>
<Button variant="xSmall" onClick={handleWriteReviewClick}>
리뷰 쓰기
</Button>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/host/components/StepTwo/StepTwo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const StepTwo = ({ onNext }: StepProps) => {
onChange={(e) => handleInputChange(e, 'email')}
placeholder="ex. [email protected]"
isValid={isEmailValid}
errorMessage="유효한 이메일 주소를 \n입력해 주세요."
errorMessage="유효한 이메일 주소를 입력해 주세요."
isCountValue={false}
/>
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const theme = {
${PretendardFont};
font-size: 1.2rem;
font-weight: 400;
line-height: normal;
line-height: 140%;
letter-spacing: 0px;
`,
'body04-m-12': css`
Expand Down

0 comments on commit 71028e7

Please sign in to comment.