Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into feature/정성혜
  • Loading branch information
eqypo9 committed Dec 4, 2024
2 parents 1331d75 + 8b2ffe6 commit 0f8be2c
Show file tree
Hide file tree
Showing 30 changed files with 153 additions and 295 deletions.
Binary file added public/font/Pretendard-Bold.woff2
Binary file not shown.
Binary file added public/font/Pretendard-Medium.woff2
Binary file not shown.
Binary file added public/font/Pretendard-Regular.woff2
Binary file not shown.
Binary file added public/font/Pretendard-SemiBold.woff2
Binary file not shown.
3 changes: 3 additions & 0 deletions public/icon/custom/icon-dot-sp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icon/custom/icon-dot.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: 3 additions & 1 deletion src/components/Button/Chips/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export default function Chips({ chipState, text, serialNumber }: ChipsProps) {
{chipState === 'average' && (
<IconComponent name="average" width={12} height={12} />
)}
{chipState === 'count' ? `누적 수강 ${formatCurrency(text)}` : text}
{chipState === 'count' || chipState === 'top'
? `누적 수강생 ${formatCurrency(text)}명`
: text}
</div>
);
}
3 changes: 1 addition & 2 deletions src/components/Button/SportButton/SportButton.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
flex-direction: column;
align-items: center;
width: 70px;
padding: 8px;
cursor: pointer;
border-radius: 12px;
}
Expand Down Expand Up @@ -43,7 +42,7 @@
.label {
margin-top: 8px;
@include B14R;
color: $gray90;
color: $gray80;
text-align: center;
transition: color 0.2s ease;
white-space: nowrap;
Expand Down
7 changes: 2 additions & 5 deletions src/components/Button/ToggleButton/ToggleButton.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@
background-color: $gray10;
border-radius: 100px;
padding: 4px;
width: fit-content;
position: relative;
}

.slider {
position: absolute;
top: 2px;
width: calc(50% - 4px);
height: calc(100% - 4px);
background-color: $white;
border-radius: 100px;
transition: transform 0.4s ease-in-out;
Expand All @@ -23,6 +19,7 @@
display: flex;
justify-content: center;
align-items: center;
padding: 4px 20px;

.stateText {
@include T14B;
Expand All @@ -48,7 +45,7 @@
color: $gray40;
background: none;
border: none;
padding: 4px 16px;
padding: 4px 20px;
border-radius: 100px;
cursor: pointer;
transition:
Expand Down
13 changes: 9 additions & 4 deletions src/components/CourseDetails/ReviewCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ import { getProfile, ProfileResponse } from '@/apis/get/getProfile';
import { deleteReview } from '@/apis/delete/deleteReview';
import { useModal } from '@/utils/modalUtils';
import useOutsideClick from '@/hooks/useOutsideClick';
import { useRecoilValue } from 'recoil';
import { authState } from '@/states/authState';

export default function ReviewCard({
businessId,
serialNumber,
averageScore,
reviews,
isNormal,
isNormal,
}: ReviewCardProps & { isNormal: boolean }) {
const [profile, setProfile] = useState<ProfileResponse>();
const [dropdownOpen, setDropdownOpen] = useState<string | null>(null);
const dropdownRef = useRef<HTMLDivElement>(null);
const { openModal } = useModal();
const { isLoggedIn } = useRecoilValue(authState);

useEffect(() => {
const fetchProfile = async () => {
Expand All @@ -32,7 +35,9 @@ export default function ReviewCard({
}
};

fetchProfile();
if (isLoggedIn) {
fetchProfile();
}
}, []);

const handleOpenReviewWrite = () => {
Expand Down Expand Up @@ -80,15 +85,15 @@ export default function ReviewCard({
<span className={styles.reviewTitle}>시설 후기</span>
<div className={styles.ratingSummary}>
<IconComponent
name={isNormal ? 'starFull' : 'starFullSP'}
name={isNormal ? 'starFull' : 'starFullSP'}
width={14}
height={14}
/>
<span className={styles.averageRating}>{averageScore}</span>
<span className={styles.reviewCount}>({reviews.length})</span>
</div>
</div>
{!hasReviewed && (
{isLoggedIn && !hasReviewed && (
<button
className={
isNormal ? styles.writeReviewButton : styles.writeReviewButtonSP
Expand Down
6 changes: 3 additions & 3 deletions src/components/CourseDetails/ReviewEdit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export default function ReviewEdit({
};

const handleSubmit = async () => {
if (text.length < 15) {
if (text.length < 10) {
openPopup({
content: '내용은 15자 이상 작성해 주세요.',
content: '내용은 10자 이상 작성해 주세요.',
});
return;
}
Expand Down Expand Up @@ -121,7 +121,7 @@ export default function ReviewEdit({
)}
</div>
<div className={styles.messageContainer}>
<p className={styles.message}>최소 15자 이상 작성</p>
<p className={styles.message}>최소 10자 이상 작성</p>
<span className={isNormal ? styles.counter : styles.counterSP}>
{text.length}
<p className={styles.total}>/ 100</p>
Expand Down

This file was deleted.

This file was deleted.

63 changes: 0 additions & 63 deletions src/components/CourseDetails/ReviewWrite/Rating/index.tsx

This file was deleted.

6 changes: 3 additions & 3 deletions src/components/CourseDetails/ReviewWrite/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export default function ReviewWrite({
};

const handleSubmit = async () => {
if (text.length < 15) {
if (text.length < 10) {
openPopup({
content: '내용은 15자 이상 작성해 주세요.',
content: '내용은 10자 이상 작성해 주세요.',
});
return;
}
Expand Down Expand Up @@ -110,7 +110,7 @@ export default function ReviewWrite({
)}
</div>
<div className={styles.messageContainer}>
<p className={styles.message}>최소 15자 이상 작성</p>
<p className={styles.message}>최소 10자 이상 작성</p>
<span className={serialNumber ? styles.counter : styles.counterSP}>
{text.length}
<p className={styles.total}>/ 100</p>
Expand Down
54 changes: 0 additions & 54 deletions src/components/DropDown/DropDown.module.scss

This file was deleted.

82 changes: 0 additions & 82 deletions src/components/DropDown/index.tsx

This file was deleted.

Loading

0 comments on commit 0f8be2c

Please sign in to comment.