Skip to content

Commit

Permalink
Merge branch 'develop' into feat/#321/redirect-url-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rtttr1 committed Feb 17, 2025
2 parents 989b9e1 + 3f98862 commit 419addd
Show file tree
Hide file tree
Showing 28 changed files with 210 additions and 97 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>
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<!doctype html>
<html lang="en">
<html lang="ko">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.png" type="image/png" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta property="og:title" content="dash" />
<meta property="og:description" content="๋‹น์‹ ์—๊ฒŒ ์ถค์„ ๋” ๊ฐ€๊นŒ์ด, ๊ฟˆ๊พธ๋˜ ๋Œ„์Šค ํด๋ž˜์Šค๋ฅผ ๋งŒ๋‚˜๋‹ค" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.da-sh.kr/" />
<meta property="og:image" content="public/dash-Thumbnail.png" />
<title>da-sh.kr</title>
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"react": "^18.3.1",
"react-calendar": "^5.1.0",
"react-dom": "^18.3.1",
"react-error-boundary": "^5.0.0",
"react-hot-toast": "^2.5.1",
"react-router-dom": "^7.1.1",
"swiper": "^11.2.1",
Expand Down
13 changes: 13 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/dash-Thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { useEffect } from 'react';
import { Suspense, useEffect } from 'react';
import { ErrorBoundary } from 'react-error-boundary';
import { Toaster } from 'react-hot-toast';
import { RouterProvider } from 'react-router-dom';
import Error from '@/pages/error';
import { router } from '@/routes/router.tsx';
import Loading from './pages/loading';
import queryClient from './queryClient';
import './styles/index.css';

Expand Down Expand Up @@ -31,7 +34,11 @@ const App = () => {
return (
<QueryClientProvider client={queryClient}>
<ReactQueryDevtools initialIsOpen={false} />
<RouterProvider router={router} />
<ErrorBoundary FallbackComponent={Error}>
<Suspense fallback={<Loading />}>
<RouterProvider router={router} />
</Suspense>
</ErrorBoundary>
<Toaster />
</QueryClientProvider>
);
Expand Down
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
3 changes: 2 additions & 1 deletion src/assets/gif/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import ClearGif from './clear.gif';
import EmptyGif from './empty.gif';
import HomeBlack from './home_black.gif';
import HomeWhite from './home_white.gif';
import LoadingGif from './loading.gif';
import LoginGif from './login.gif';

export { ClearGif, EmptyGif, LoginGif, HomeBlack, HomeWhite };
export { ClearGif, EmptyGif, LoginGif, HomeBlack, HomeWhite, LoadingGif };
Binary file added src/assets/gif/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/components/ClassCard/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,28 @@ export const cardContainerStyle = style({
export const cardImageStyle = style({
width: '8.4rem',
height: '8.4rem',
flexShrink: 0,

objectFit: 'cover',

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
1 change: 1 addition & 0 deletions src/pages/error/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const Error = () => {

const handleHomeNavigation = () => {
navigate(ROUTES_CONFIG.home.path);
window.location.reload();
};

return (
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
11 changes: 9 additions & 2 deletions src/pages/home/components/HomeCarousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ const ADVERTISEMENTS = [
imageUrl: KkukgirlImg,
description: `5์ฃผ ์ง‘์ค‘ ์ปค๋ฆฌํ˜๋Ÿผ, ์Šค๊ฑธํŒŒ ์ถœ์—ฐ ๋Œ„์„œ์˜ `,
description2: 'ํ”ผ๋ฉ”์ผ ํž™ํ•ฉ ๊ธฐ๋ณธ๊ธฐ ํŠผํŠผํ•˜๊ฒŒ ๋‹ค์ง€๊ธฐ',
id: 25,
},
{ imageUrl: ChoreohongImg, description: '์ฝ”๋ ˆํ™๊ณผ ํ•จ๊ป˜ํ•˜๋Š”', description2: 'NMIXX-DASH ์ฝ”๋ ˆ์˜ค๊ทธ๋ž˜ํ”ผ' },
{ imageUrl: ChoreohongImg, description: '์ฝ”๋ ˆํ™๊ณผ ํ•จ๊ป˜ํ•˜๋Š”', description2: 'NMIXX-DASH ์ฝ”๋ ˆ์˜ค๊ทธ๋ž˜ํ”ผ', id: 24 },
{
imageUrl: BannerImg,
description: '์•Œ๊ณ  ์‹ถ๋˜ ๋Œ„์„œ๋‚˜ ๊ด€์‹ฌ์žˆ๋Š” ํด๋ž˜์Šค๋ฅผ ',
description2: 'ํ•œ ๋ˆˆ์— ๋ชจ์•„๋ณผ ์ˆ˜ ์žˆ์–ด์š”!',
id: 0,
},
];
const HomeCarousel = () => {
Expand All @@ -32,7 +34,12 @@ const HomeCarousel = () => {
{ADVERTISEMENTS.map((data, index) => {
return (
<SwiperSlide key={`${index}-${data.description}`}>
<SliderItem imageUrl={data.imageUrl} description={data.description} description2={data.description2} />
<SliderItem
imageUrl={data.imageUrl}
description={data.description}
description2={data.description2}
id={data.id}
/>
</SwiperSlide>
);
})}
Expand Down
5 changes: 4 additions & 1 deletion src/pages/home/components/LessonItem/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ export const classImageStyle = style({
});

export const titleStyle = style({
width: '16.4rem',
minWidth: '16.4rem',
maxHeight: '4rem',

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

});

export const teacherImageStyle = style({
Expand Down
Loading

0 comments on commit 419addd

Please sign in to comment.