Skip to content

Commit

Permalink
Merge branch 'develop' into fix/#304/style
Browse files Browse the repository at this point in the history
  • Loading branch information
rtttr1 authored Jan 24, 2025
2 parents b8a6ba9 + 6d2168a commit d224c29
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 70 deletions.
46 changes: 38 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
# DASH

## ๐Ÿ“ข ์„œ๋น„์Šค ์†Œ๊ฐœ
## ๐Ÿ’ƒ ์„œ๋น„์Šค ์†Œ๊ฐœ

### โ€œ๋Œ„์Šค ํด๋ž˜์Šค์™€ ๋Œ„์„œ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ํ•œ๋ˆˆ์— ํ™•์ธํ•˜๊ณ , ์›ํ•˜๋Š” ํด๋ž˜์Šค๋ฅผ ๊ฐ„ํŽธํ•˜๊ฒŒ ์‹ ์ฒญํ•  ์ˆ˜ ์žˆ๋Š” ์„œ๋น„์Šค.โ€
![image](https://github.com/user-attachments/assets/25a0cb52-00f1-4ce9-8564-1070cb191231)

์ถค์„ ์‚ฌ๋ž‘ํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์ด ๋ชจ์—ฌ ์„ฑ์žฅํ•  ์ˆ˜ ์žˆ๋Š” ๊ณต๊ฐ„์„ ์ œ๊ณตํ•˜๊ณ , ์ˆ˜๊ฐ•์ƒ๊ณผ ๋Œ„์„œ๋ฅผ ์—ฐ๊ฒฐํ•˜๋Š” ๋‹ค๋ฆฌ๊ฐ€ ๋˜์–ด์ค€๋‹ค.

<br />
### ๐Ÿ’ƒ โ€œ๋‹น์‹ ์—๊ฒŒ ์ถค์„ ๋” ๊ฐ€๊นŒ์ด, ์„ธ์ƒ์˜ ๋ชจ๋“  ๋Œ„์„œ์™€ ํด๋ž˜์Šค๋ฅผ ๋ชจ์€ ์„œ๋น„์Šค"


> Da/shโ€™๋Š” ์„œ๋น„์Šค์˜ ํ•ต์‹ฌ ํ‚ค์›Œ๋“œ์ธ Dance(์ถค)์™€ Share(๊ณต์œ )๋ฅผ ๊ฒฐํ•ฉํ•œ ์ด๋ฆ„์œผ๋กœ,
> ๋Œ„์Šค ํด๋ž˜์Šค์™€ ๊ฐ•์‚ฌ๋Œ„์„œ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์ž์œ ๋กญ๊ฒŒ ํƒ์ƒ‰ํ•˜๊ณ  ์›ํ•˜๋Š” ํด๋ž˜์Šค๋ฅผ ๊ฐ„ํŽธํ•˜๊ฒŒ ์‹ ์ฒญํ•  ์ˆ˜ ์žˆ๋Š” ํ”Œ๋žซํผ์ž…๋‹ˆ๋‹ค.
> ์ด ์„œ๋น„์Šค๋Š” ์ˆ˜๊ฐ•์ƒ๊ณผ ๊ฐ•์‚ฌ๋ฅผ ์—ฐ๊ฒฐํ•˜๋Š” ๋‹ค๋ฆฌ ์—ญํ• ์„ ํ•จ๊ณผ ๋™์‹œ์— ์„ธ์ƒ์˜ ๋ชจ๋“  ๋Œ„์„œ๋“ค์ด ํ•จ๊ป˜ ์†Œํ†ตํ•˜๊ณ  ์„ฑ์žฅํ•  ์ˆ˜ ์žˆ๋Š” ๊ณต๊ฐ„์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

<br/>
<br/>

### ๐Ÿ’ƒ์„œ๋น„์Šค ํ”Œ๋กœ์šฐ

![image](https://github.com/user-attachments/assets/2bb85425-a7ca-46c3-b4e7-addb522a2629)

<br/>

#### DASH์˜ ์›จ๋น„๋“ค์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค!

![Image](https://github.com/user-attachments/assets/c475ac1a-1f4d-4ef8-94ab-fa29307849fe)


<br />

## ๐ŸŽˆ ํŒ€์›

<div align="center">
| <img src="https://avatars.githubusercontent.com/u/66071954?v=4" width="200" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> | <img src="https://avatars.githubusercontent.com/u/94050324?v=4" width="200" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> | <img src="https://avatars.githubusercontent.com/u/91944542?v=4" width="200" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> | <img src="https://avatars.githubusercontent.com/u/90364839?v=4" width="200" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> | <img src="https://avatars.githubusercontent.com/u/117571282?s=96&v=4" width="200" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> |
| <img src="https://github.com/user-attachments/assets/f315094a-0de0-4eca-bc4c-7e48cb2a7b6f" width="150" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> | <img src="https://github.com/user-attachments/assets/067c37c2-f544-4238-8358-eb5f051fef4a" width="150" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> | <img src="https://github.com/user-attachments/assets/a97c1d70-6107-44c3-8de8-d0fa708090ca" width="150" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> | <img src="https://github.com/user-attachments/assets/713158dd-64a7-40c4-b177-ed85896a6cf1" width="150" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> | <img src="https://github.com/user-attachments/assets/372ad506-b2d2-41fc-ae4e-adbb2466f292" width="150" alt="ํ”„๋กœํ•„์‚ฌ์ง„"> |
| :-------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------:
| <div align = "center"><b>๊น€๊ฑดํœ˜</b></div> | <div align = "center"><b>๊น€๊ทœํ™</b></div> | <div align = "center"><b>๋ฐ•ํฌ์„ </b></div> | <div align = "center"><b>ํ•œ์ˆ˜์ •</b></div> | <div align = "center"><b>์ด์ง„ํ˜</b></div>
| [@KIMGEONHWI](https://github.com/KIMGEONHWI) | [@rtttr1](https://github.com/rtttr1) | [@heesunee](https://github.com/heesunee) | [@hansoojeongsj](https://github.com/hansoojeongsj) | [@constantly-dev](https://github.com/constantly-dev) |
| <div align = "center"><b>์ด์ง„ํ˜</b></div> | <div align = "center"><b>๊น€๊ทœํ™</b></div> | <div align = "center"><b>๋ฐ•ํฌ์„ </b></div> | <div align = "center"><b>ํ•œ์ˆ˜์ •</b></div> | <div align = "center"><b>๊น€๊ฑดํœ˜</b></div>
| [@constantly-dev](https://github.com/constantly-dev) | [@rtttr1](https://github.com/rtttr1) | [@heesunee](https://github.com/heesunee) | [@hansoojeongsj](https://github.com/hansoojeongsj) | [@KIMGEONHWI](https://github.com/KIMGEONHWI) |

</div>

Expand Down Expand Up @@ -119,7 +138,9 @@

## ๐Ÿ“ข ๋„ค์ด๋ฐ ์ปจ๋ฒค์…˜

### 1. ๊ธฐ๋ณธ (Default)
<details>
### 1. ๊ธฐ๋ณธ (Default)

1. ์ปดํฌ๋„ŒํŠธ / class `PascalCase`
2. ํด๋”๋ช… `carmelCase`
Expand Down Expand Up @@ -220,8 +241,13 @@
<br/>
<br/>

</details>


## ๐Ÿ“ข ์ฝ”๋”ฉ (๊ฐœ๋ฐœ) ์ปจ๋ฒค์…˜

<details>

### ๋ณ€์ˆ˜

- var ๊ธˆ์ง€.
Expand Down Expand Up @@ -296,6 +322,8 @@ const InfoText = () => {
```
- ๋ถˆํ•„์š”ํ•œ ๋ฐ˜๋ณต๋ฌธ ์ง€์–‘ : filter, array.include() ๋“ฑ
- ์กฐ๊ฑด๋ถ€๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ํ™•์ธํ•˜๊ฑฐ๋‚˜ ๋ฝ‘์•„์•ผํ•˜๋Š” ๋กœ์ง์„ ์‚ฌ์šฉํ•  ๋•Œ์—๋Š” `Map` ์ด๋‚˜ `Object`์ฒ˜๋Ÿผ `key`๊ฐ’์„ ์ด์šฉํ•ด์„œ ์›์†Œ๋ฅผ ์ฐพ๋Š” ์ž๋ฃŒํ˜•์„ ์ด์šฉํ•˜๋Š”๊ฒƒ์„ ๊ณ ๋ คํ•ด๋ณด๊ฑฐ๋‚˜, ๋ฐฐ์—ด์„ ์ˆœํšŒํ•˜์ง€ ์•Š๊ณ  index๋กœ ๋ฐ”๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด ์—†๋Š”์ง€ ๊ณ ๋ ค.
### Style โ†’ X
Expand All @@ -308,3 +336,5 @@ const InfoText = () => {
- button ํƒœ๊ทธ์— **`type`**์€ ๋ช…์‹œ์ ์œผ๋กœ ์ž‘์„ฑ
- ๋น„๊ต ์—ฐ์‚ฐ์ž๋Š” **`===`**์™€ **`!==`**๋งŒ์„ ์‚ฌ์šฉ
- axios ์•ˆ์—์„œ **`then/catch`** ๋Œ€์‹  **`async/await`** ์ง€ํ–ฅ
</details>
6 changes: 1 addition & 5 deletions src/apis/auth/quries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ export const useLoginMutation = () => {
onSuccess: ({ data: { accessToken, refreshToken, isOnboarded } }) => {
instance.defaults.headers.Authorization = `Bearer ${accessToken}`;
if (!isOnboarded) {
clearStorage();
navigate(ROUTES_CONFIG.onboarding.path, { state: { accessToken, refreshToken } });
return;
}

if (!isOnboarded) {
navigate(ROUTES_CONFIG.onboarding.path);
return;
}

navigate(ROUTES_CONFIG.home.path);
setStorage(accessToken, refreshToken);
},
Expand Down
18 changes: 18 additions & 0 deletions src/components/ClassCard/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,26 @@ export const cardContainerStyle = style({
export const cardImageStyle = style({
width: '8.4rem',
height: '8.4rem',
flexShrink: 0,

borderRadius: 3.4,

backgroundColor: vars.colors.gray04,
});

export const cardContentStyle = style({
flex: 1,
display: 'flex',
flexDirection: 'column',
gap: '0.8rem',
overflow: 'hidden',

width: '100%',
});

export const lessonNameStyle = style({
width: '100%',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
});
16 changes: 12 additions & 4 deletions src/components/ClassCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const ClassCard = ({
return '๋ชจ์ง‘์ค‘';
case 'completed':
return '๋ชจ์ง‘์™„๋ฃŒ';
case 'ongoing':
return '๋ชจ์ง‘์™„๋ฃŒ';
default:
return '';
}
Expand Down Expand Up @@ -96,7 +98,7 @@ const ClassCard = ({

<Flex gap="1.2rem" marginBottom="1.6rem">
<img src={lessonImageUrl} className={styles.cardImageStyle} alt={`${lessonName} ์ด๋ฏธ์ง€`} />
<Flex direction="column" gap="0.8rem">
<Flex direction="column" gap="0.8rem" className={styles.cardContentStyle}>
<Flex gap="0.3rem">
<Tag type="genre" size="small">
{lessonGenre && genreMapping[lessonGenre]}
Expand All @@ -105,7 +107,7 @@ const ClassCard = ({
{lessonLevel && levelMapping[lessonLevel]}
</Tag>
</Flex>
<Head level="h2" tag="h6">
<Head level="h2" tag="h6" className={styles.lessonNameStyle}>
{lessonName}
</Head>
<Flex direction="column" gap="0.4rem">
Expand All @@ -126,8 +128,14 @@ const ClassCard = ({
์žฅ์†Œ
</Text>
<Text tag="c1" color="gray9">
{lessonLocation}&nbsp;
{lessonDetailedAddress}
{lessonLocation || lessonDetailedAddress ? (
<>
{lessonLocation}&nbsp;
{lessonDetailedAddress}
</>
) : (
'๋ฏธ์ •'
)}
</Text>
</Flex>
</Flex>
Expand Down
35 changes: 3 additions & 32 deletions src/pages/home/components/BottomSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,6 @@ const BottomSection = ({ isInstructor }: { isInstructor: boolean }) => {
}
};

// ๋ฆฌ์ŠคํŠธ ์•„์ดํ…œ ๋ Œ๋”๋ง
const renderListItem = (item: (typeof LIST_DATA)[number]) => {
const isDisabled = !!item.isInstructorRequired && !isInstructor;
const ArrowIcon = isDisabled ? IcArrowRightSmallGray0432 : IcArrowRightSmallGray0732;

return (
<React.Fragment key={item.id}>
<li
className={`${styles.listStyle} ${isDisabled ? styles.disabledStyle : ''}`}
onClick={() => handleItemClick(item, isDisabled)}>
<p>{item.label}</p>
<ArrowIcon width={32} height={32} />
</li>
{item.hasDivider && (
<div className={styles.dividerStyle}>
<Divider color="gray1" thickness={1} />
</div>
)}
</React.Fragment>
);
};

return (
<Flex>
<ul className={styles.ulStyle}>
Expand All @@ -61,18 +39,11 @@ const BottomSection = ({ isInstructor }: { isInstructor: boolean }) => {
(item.isInstructorRequired && !isInstructor) || (item.label === '๊ฐ•์‚ฌ ๋“ฑ๋ก' && isInstructor);
const ArrowIcon = isDisabled ? IcArrowRightSmallGray0432 : IcArrowRightSmallGray0732;

const handleClick = () => {
if (isDisabled) return;
if (item.label === '๋กœ๊ทธ์•„์›ƒ') {
handleLogout();
} else if (item.path) {
navigate(item.path);
}
};

return (
<React.Fragment key={item.id}>
<li className={`${styles.listStyle} ${isDisabled ? styles.disabledStyle : ''}`} onClick={handleClick}>
<li
className={`${styles.listStyle} ${isDisabled ? styles.disabledStyle : ''}`}
onClick={() => handleItemClick(item, isDisabled)}>
<p>{item.label}</p>
<ArrowIcon width={32} height={32} />
</li>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/home/components/LessonItem/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const titleStyle = style({

whiteSpace: 'normal',
overflow: 'hidden',
wordBreak: 'break-all',

});

export const teacherImageStyle = style({
Expand Down
5 changes: 2 additions & 3 deletions src/pages/home/components/TopSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const TopSection = ({ userData, onClose, isInstructor }: TopSectionProps) => {

const isMyLessonsZero = () => {
if (userData.reservationCount > 0) return handleNavigate(ROUTES_CONFIG.mypageReservation.path);

return;
};

Expand Down Expand Up @@ -84,7 +83,7 @@ const TopSection = ({ userData, onClose, isInstructor }: TopSectionProps) => {
</Flex>
</Flex>

<Flex paddingTop="2.4rem" paddingLeft="3.2rem" paddingRight="3.2rem" gap="2.1rem" onClick={notify}>
<Flex paddingTop="2.4rem" paddingLeft="3.2rem" paddingRight="3.2rem" gap="2.1rem">
<Flex align="center" onClick={isMyLessonsZero}>
<Flex direction="column" align="center" gap="0.5rem">
<Head
Expand All @@ -101,7 +100,7 @@ const TopSection = ({ userData, onClose, isInstructor }: TopSectionProps) => {

<Divider direction="vertical" color="gray2" length={32} thickness={1} />

<Flex direction="column" align="center" gap="0.5rem" className={styles.disabledStyle}>
<Flex direction="column" align="center" gap="0.5rem" className={styles.disabledStyle} onClick={notify}>
<Head tag="h4" color={getTextColor(userData.favoriteCount)}>
{userData.favoriteCount}
</Head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const InputSection = ({
{inputItems.map(({ id, value }) => (
<div key={id} className={inputContainerStyle}>
<Input
// value={value}
value={value}
placeholder={placeholder}
onChange={(e) => {
const updatedItems = inputItems.map((item) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const IntroductionStep = ({ detail, onInfoChange }: IntroductionStepProps) => {

return (
<>
<Description title="์†Œ๊ฐœ๊ธ€ ์ž‘์„ฑ" subTitle="๋Œ„์„œ ๋ฉ”์ธํ…Œ์ธ ๋‹˜์— ๋Œ€ํ•ด 30์ž ์ด์ƒ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”" />
<Description title="์†Œ๊ฐœ๊ธ€ ์ž‘์„ฑ" subTitle="๋Œ„์„œ๋‹˜์— ๋Œ€ํ•ด 30์ž ์ด์ƒ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”" />
<textarea
ref={textAreaRef}
onInput={handleInput}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface PersonalSNSStepProps {
onInfoChange: <K extends keyof InstructorRegisterInfoTypes>(key: K, value: InstructorRegisterInfoTypes[K]) => void;
}

const PersonalSNSStep = ({ onInfoChange }: PersonalSNSStepProps) => {
const PersonalSNSStep = ({ onInfoChange, instagram, youtube }: PersonalSNSStepProps) => {
const handleInstagramChange = (value: string) => {
onInfoChange(INFO_KEY.INSTAGRAM, value);
};
Expand All @@ -31,15 +31,15 @@ const PersonalSNSStep = ({ onInfoChange }: PersonalSNSStepProps) => {
<IcInstagram20 width={'2rem'} />
<Text tag="b6">์ธ์Šคํƒ€๊ทธ๋žจ</Text>
</Flex>
<Input placeholder="dashdash.kr" onChange={(e) => handleInstagramChange(e.target.value)} />
<Input value={instagram} placeholder="dashdash.kr" onChange={(e) => handleInstagramChange(e.target.value)} />
</Flex>

<Flex direction="column" gap="1.2rem" width="100%">
<Flex gap="0.8rem" align="center">
<IcYoutube20 width={'2rem'} />
<Text tag="b6">์œ ํŠœ๋ธŒ ์ฑ„๋„</Text>
</Flex>
<Input placeholder="dashofficial" onChange={(e) => handleYoutubeChange(e.target.value)} />
<Input value={youtube} placeholder="dashofficial" onChange={(e) => handleYoutubeChange(e.target.value)} />
</Flex>
</Flex>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/mypage/constants/myPageList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export const LIST_DATA = [
},
{ label: '์ž์ฃผ ๋ฌป๋Š” ์งˆ๋ฌธ', id: 5, inActive: true },
{ label: '๊ณ ๊ฐ ์„ผํ„ฐ', id: 6, hasDivider: true, inActive: true },
{ label: '๋กœ๊ทธ์•„์›ƒ', id: 7, inActive: true },
{ label: '๋กœ๊ทธ์•„์›ƒ', id: 7 },
];
13 changes: 1 addition & 12 deletions src/pages/mypage/mypageReservation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ const MyPageReservation = () => {
const navigate = useNavigate();
const { data: reservationData } = useGetReservations();


const handleDetailClick = (reservationId: number | undefined) => {
if (reservationId !== undefined) {
const path = ROUTES_CONFIG.mypageReservationDetail.path(reservationId.toString());
navigate(path);
} else {
navigate(ROUTES_CONFIG.error.path);
}
};

const handleNavigateHome = () => {
navigate('/');
};
Expand Down Expand Up @@ -54,8 +44,7 @@ const MyPageReservation = () => {
lessonStartDateTime={reservation.startDateTime}
lessonEndDateTime={reservation.endDateTime}
isReservation={true}
onClick={() => handleClassCardClick(navigate, reservation.reservationId)}
>
onClick={() => handleClassCardClick(navigate, reservation.reservationId)}>
<BoxButton onClick={handleCancelClick} variant="temp">
์ทจ์†Œํ•˜๊ธฐ
</BoxButton>
Expand Down
1 change: 1 addition & 0 deletions src/pages/search/components/Calendar/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ globalStyle('.react-calendar', {
flexDirection: 'column',
alignItems: 'center',
marginBottom: '0.9rem',
padding: '0 2rem',
});

globalStyle('.react-calendar__navigation', {
Expand Down
7 changes: 7 additions & 0 deletions src/pages/search/components/SearchBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ const SearchBar = forwardRef<HTMLInputElement, SearchBarProps>(
handleSearchChange(event.target.value);
};

const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
if (event.key === 'Enter') {
handleSearchIconClick();
}
};

return (
<Flex align="center" width="29.9rem" height="4.4rem" position="relative" margin="0 0 0 1.2rem">
<IcSearchGray className={searchGrayStyle} width={24} onClick={handleSearchIconClick} />
Expand All @@ -25,6 +31,7 @@ const SearchBar = forwardRef<HTMLInputElement, SearchBarProps>(
value={searchValue}
placeholder="์žฅ๋ฅด๋‚˜ ๋Œ„์„œ ๋„ค์ž„์„ ๊ฒ€์ƒ‰ํ•ด ๋ณด์„ธ์š”"
onChange={handleInputChange}
onKeyDown={handleKeyDown}
/>
<IcXCircleGray className={xCircleGrayStyle} width={24} onClick={() => handleSearchChange('')} />
</Flex>
Expand Down

0 comments on commit d224c29

Please sign in to comment.