diff --git a/README.md b/README.md index 633edef7..61159f47 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,31 @@ # DASH -## πŸ“’ μ„œλΉ„μŠ€ μ†Œκ°œ +## πŸ’ƒ μ„œλΉ„μŠ€ μ†Œκ°œ -### β€œλŒ„μŠ€ ν΄λž˜μŠ€μ™€ λŒ„μ„œμ— λŒ€ν•œ 정보λ₯Ό ν•œλˆˆμ— ν™•μΈν•˜κ³ , μ›ν•˜λŠ” 클래슀λ₯Ό κ°„νŽΈν•˜κ²Œ μ‹ μ²­ν•  수 μžˆλŠ” μ„œλΉ„μŠ€.” +![image](https://github.com/user-attachments/assets/25a0cb52-00f1-4ce9-8564-1070cb191231) -좀을 μ‚¬λž‘ν•˜λŠ” μ‚¬λžŒλ“€μ΄ λͺ¨μ—¬ μ„±μž₯ν•  수 μžˆλŠ” 곡간을 μ œκ³΅ν•˜κ³ , μˆ˜κ°•μƒκ³Ό λŒ„μ„œλ₯Ό μ—°κ²°ν•˜λŠ” 닀리가 λ˜μ–΄μ€€λ‹€. -
+### πŸ’ƒ β€œλ‹Ήμ‹ μ—κ²Œ 좀을 더 κ°€κΉŒμ΄, μ„Έμƒμ˜ λͺ¨λ“  λŒ„μ„œμ™€ 클래슀λ₯Ό λͺ¨μ€ μ„œλΉ„μŠ€" + + +> Da/shβ€™λŠ” μ„œλΉ„μŠ€μ˜ 핡심 ν‚€μ›Œλ“œμΈ Dance(μΆ€)와 Share(곡유)λ₯Ό κ²°ν•©ν•œ μ΄λ¦„μœΌλ‘œ, +> λŒ„μŠ€ ν΄λž˜μŠ€μ™€ κ°•μ‚¬λŒ„μ„œμ— λŒ€ν•œ 정보λ₯Ό 자유둭게 νƒμƒ‰ν•˜κ³  μ›ν•˜λŠ” 클래슀λ₯Ό κ°„νŽΈν•˜κ²Œ μ‹ μ²­ν•  수 μžˆλŠ” ν”Œλž«νΌμž…λ‹ˆλ‹€. +> 이 μ„œλΉ„μŠ€λŠ” μˆ˜κ°•μƒκ³Ό 강사λ₯Ό μ—°κ²°ν•˜λŠ” 닀리 역할을 함과 λ™μ‹œμ— μ„Έμƒμ˜ λͺ¨λ“  λŒ„μ„œλ“€μ΄ ν•¨κ»˜ μ†Œν†΅ν•˜κ³  μ„±μž₯ν•  수 μžˆλŠ” 곡간을 μ œκ³΅ν•©λ‹ˆλ‹€. + + +
+
+ +### πŸ’ƒμ„œλΉ„μŠ€ ν”Œλ‘œμš° + +![image](https://github.com/user-attachments/assets/2bb85425-a7ca-46c3-b4e7-addb522a2629) + +
+ +#### DASH의 웨비듀을 μ†Œκ°œν•©λ‹ˆλ‹€! + +![Image](https://github.com/user-attachments/assets/c475ac1a-1f4d-4ef8-94ab-fa29307849fe) +
@@ -14,10 +33,10 @@
-| ν”„λ‘œν•„μ‚¬μ§„ | ν”„λ‘œν•„μ‚¬μ§„ | ν”„λ‘œν•„μ‚¬μ§„ | ν”„λ‘œν•„μ‚¬μ§„ | ν”„λ‘œν•„μ‚¬μ§„ | +| ν”„λ‘œν•„μ‚¬μ§„ | ν”„λ‘œν•„μ‚¬μ§„ | ν”„λ‘œν•„μ‚¬μ§„ | ν”„λ‘œν•„μ‚¬μ§„ | ν”„λ‘œν•„μ‚¬μ§„ | | :-------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------: -|
κΉ€κ±΄νœ˜
|
κΉ€κ·œν™
|
박희선
|
ν•œμˆ˜μ •
|
μ΄μ§„ν˜
-| [@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) | +|
μ΄μ§„ν˜
|
κΉ€κ·œν™
|
박희선
|
ν•œμˆ˜μ •
|
κΉ€κ±΄νœ˜
+| [@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) |
@@ -119,7 +138,9 @@ ## πŸ“’ 넀이밍 μ»¨λ²€μ…˜ -### 1. κΈ°λ³Έ (Default) +
+ + ### 1. κΈ°λ³Έ (Default) 1. μ»΄ν¬λ„ŒνŠΈ / class `PascalCase` 2. 폴더λͺ… `carmelCase` @@ -220,8 +241,13 @@

+
+ + ## πŸ“’ μ½”λ”© (개발) μ»¨λ²€μ…˜ +
+ ### λ³€μˆ˜ - var κΈˆμ§€. @@ -296,6 +322,8 @@ const InfoText = () => { ``` - λΆˆν•„μš”ν•œ 반볡문 지양 : filter, array.include() λ“± - μ‘°κ±΄λΆ€λ‘œ 데이터λ₯Ό ν™•μΈν•˜κ±°λ‚˜ λ½‘μ•„μ•Όν•˜λŠ” λ‘œμ§μ„ μ‚¬μš©ν•  λ•Œμ—λŠ” `Map` μ΄λ‚˜ `Object`처럼 `key`값을 μ΄μš©ν•΄μ„œ μ›μ†Œλ₯Ό μ°ΎλŠ” μžλ£Œν˜•μ„ μ΄μš©ν•˜λŠ”κ²ƒμ„ κ³ λ €ν•΄λ³΄κ±°λ‚˜, 배열을 μˆœνšŒν•˜μ§€ μ•Šκ³  index둜 λ°”λ‘œ μ ‘κ·Όν•  수 μžˆλŠ” 방법이 μ—†λŠ”μ§€ κ³ λ €. + + ### Style β†’ X @@ -308,3 +336,5 @@ const InfoText = () => { - button νƒœκ·Έμ— **`type`**은 λͺ…μ‹œμ μœΌλ‘œ μž‘μ„± - 비ꡐ μ—°μ‚°μžλŠ” **`===`**와 **`!==`**λ§Œμ„ μ‚¬μš© - axios μ•ˆμ—μ„œ **`then/catch`** λŒ€μ‹  **`async/await`** 지ν–₯ + +
diff --git a/index.html b/index.html index 4de73fb5..2a910b6c 100644 --- a/index.html +++ b/index.html @@ -1,10 +1,15 @@ - + + + + + + da-sh.kr diff --git a/package.json b/package.json index f5aa7e6e..5da0ab89 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 30443878..b4b583dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,6 +47,9 @@ importers: react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) + react-error-boundary: + specifier: ^5.0.0 + version: 5.0.0(react@18.3.1) react-hot-toast: specifier: ^2.5.1 version: 2.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -2540,6 +2543,11 @@ packages: peerDependencies: react: ^18.3.1 + react-error-boundary@5.0.0: + resolution: {integrity: sha512-tnjAxG+IkpLephNcePNA7v6F/QpWLH8He65+DmedchDwg162JZqx4NmbXj0mlAYVVEd81OW7aFhmbsScYfiAFQ==} + peerDependencies: + react: '>=16.13.1' + react-hot-toast@2.5.1: resolution: {integrity: sha512-54Gq1ZD1JbmAb4psp9bvFHjS7lje+8ubboUmvKZkCsQBLH6AOpZ9JemfRvIdHcfb9AZXRaFLrb3qUobGYDJhFQ==} engines: {node: '>=10'} @@ -5476,6 +5484,11 @@ snapshots: react: 18.3.1 scheduler: 0.23.2 + react-error-boundary@5.0.0(react@18.3.1): + dependencies: + '@babel/runtime': 7.26.0 + react: 18.3.1 + react-hot-toast@2.5.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: csstype: 3.1.3 diff --git a/public/dash-Thumbnail.png b/public/dash-Thumbnail.png new file mode 100644 index 00000000..9ae4570d Binary files /dev/null and b/public/dash-Thumbnail.png differ diff --git a/src/App.tsx b/src/App.tsx index 4025ebff..447fcd6f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -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'; @@ -31,7 +34,11 @@ const App = () => { return ( - + + }> + + + ); diff --git a/src/apis/auth/quries/index.ts b/src/apis/auth/quries/index.ts index f51bac53..54c48d93 100644 --- a/src/apis/auth/quries/index.ts +++ b/src/apis/auth/quries/index.ts @@ -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); }, diff --git a/src/assets/gif/index.ts b/src/assets/gif/index.ts index 7bfb5f68..23dae398 100644 --- a/src/assets/gif/index.ts +++ b/src/assets/gif/index.ts @@ -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 }; diff --git a/src/assets/gif/loading.gif b/src/assets/gif/loading.gif new file mode 100644 index 00000000..42bdb8e2 Binary files /dev/null and b/src/assets/gif/loading.gif differ diff --git a/src/components/ClassCard/index.css.ts b/src/components/ClassCard/index.css.ts index 2716d702..d6885a06 100644 --- a/src/components/ClassCard/index.css.ts +++ b/src/components/ClassCard/index.css.ts @@ -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', +}); diff --git a/src/components/ClassCard/index.tsx b/src/components/ClassCard/index.tsx index 83ee40a8..2e0c2060 100644 --- a/src/components/ClassCard/index.tsx +++ b/src/components/ClassCard/index.tsx @@ -44,6 +44,8 @@ const ClassCard = ({ return 'λͺ¨μ§‘쀑'; case 'completed': return 'λͺ¨μ§‘μ™„λ£Œ'; + case 'ongoing': + return 'λͺ¨μ§‘μ™„λ£Œ'; default: return ''; } @@ -96,7 +98,7 @@ const ClassCard = ({ {`${lessonName} - + {lessonGenre && genreMapping[lessonGenre]} @@ -105,7 +107,7 @@ const ClassCard = ({ {lessonLevel && levelMapping[lessonLevel]} - + {lessonName} @@ -126,8 +128,14 @@ const ClassCard = ({ μž₯μ†Œ - {lessonLocation}  - {lessonDetailedAddress} + {lessonLocation || lessonDetailedAddress ? ( + <> + {lessonLocation}  + {lessonDetailedAddress} + + ) : ( + 'λ―Έμ •' + )} diff --git a/src/pages/error/index.tsx b/src/pages/error/index.tsx index ef35f3d2..9f825b0a 100644 --- a/src/pages/error/index.tsx +++ b/src/pages/error/index.tsx @@ -12,6 +12,7 @@ const Error = () => { const handleHomeNavigation = () => { navigate(ROUTES_CONFIG.home.path); + window.location.reload(); }; return ( diff --git a/src/pages/home/components/BottomSection/index.tsx b/src/pages/home/components/BottomSection/index.tsx index a39c5e9d..b713eae6 100644 --- a/src/pages/home/components/BottomSection/index.tsx +++ b/src/pages/home/components/BottomSection/index.tsx @@ -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 ( - -
  • handleItemClick(item, isDisabled)}> -

    {item.label}

    - -
  • - {item.hasDivider && ( -
    - -
    - )} -
    - ); - }; - return (
      @@ -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 ( -
    • +
    • handleItemClick(item, isDisabled)}>

      {item.label}

    • diff --git a/src/pages/home/components/HomeCarousel/index.tsx b/src/pages/home/components/HomeCarousel/index.tsx index 5b3a8ccb..ea58ec4f 100644 --- a/src/pages/home/components/HomeCarousel/index.tsx +++ b/src/pages/home/components/HomeCarousel/index.tsx @@ -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 = () => { @@ -32,7 +34,12 @@ const HomeCarousel = () => { {ADVERTISEMENTS.map((data, index) => { return ( - + ); })} diff --git a/src/pages/home/components/LessonItem/index.css.ts b/src/pages/home/components/LessonItem/index.css.ts index 744ad73f..cd521f0b 100644 --- a/src/pages/home/components/LessonItem/index.css.ts +++ b/src/pages/home/components/LessonItem/index.css.ts @@ -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({ diff --git a/src/pages/home/components/SliderItem/index.tsx b/src/pages/home/components/SliderItem/index.tsx index e963537b..eebf95d2 100644 --- a/src/pages/home/components/SliderItem/index.tsx +++ b/src/pages/home/components/SliderItem/index.tsx @@ -1,3 +1,4 @@ +import { useNavigate } from 'react-router-dom'; import { descriptionStyle, moreButtonStyle, @@ -8,15 +9,24 @@ import { } from '@/pages/home/components/SliderItem/index.css'; import Flex from '@/components/Flex'; import Head from '@/components/Head'; +import { ROUTES_CONFIG } from '@/routes/routesConfig'; import { IcArrowRightWhite14 } from '@/assets/svg'; interface SliderItemProps { imageUrl: string; description: string; description2: string; + id: number; } -const SliderItem = ({ imageUrl, description, description2 }: SliderItemProps) => { +const SliderItem = ({ imageUrl, description, description2, id }: SliderItemProps) => { + const navigate = useNavigate(); + const handleDetailClick = () => { + if (id === 0) { + return; + } + navigate(ROUTES_CONFIG.class.path(`${id}`)); + }; return ( @@ -29,7 +39,9 @@ const SliderItem = ({ imageUrl, description, description2 }: SliderItemProps) => - + diff --git a/src/pages/home/components/TopSection/index.tsx b/src/pages/home/components/TopSection/index.tsx index dc4c1c1a..4c2f147b 100644 --- a/src/pages/home/components/TopSection/index.tsx +++ b/src/pages/home/components/TopSection/index.tsx @@ -24,7 +24,6 @@ const TopSection = ({ userData, onClose, isInstructor }: TopSectionProps) => { const isMyLessonsZero = () => { if (userData.reservationCount > 0) return handleNavigate(ROUTES_CONFIG.mypageReservation.path); - return; }; @@ -84,7 +83,7 @@ const TopSection = ({ userData, onClose, isInstructor }: TopSectionProps) => { - + { - + {userData.favoriteCount} diff --git a/src/pages/instructorRegister/components/InstructorRegisterFunnel/CareerStep/InputSection/index.tsx b/src/pages/instructorRegister/components/InstructorRegisterFunnel/CareerStep/InputSection/index.tsx index 6dead38d..f95e63e6 100644 --- a/src/pages/instructorRegister/components/InstructorRegisterFunnel/CareerStep/InputSection/index.tsx +++ b/src/pages/instructorRegister/components/InstructorRegisterFunnel/CareerStep/InputSection/index.tsx @@ -85,7 +85,7 @@ const InputSection = ({ {inputItems.map(({ id, value }) => (
      { const updatedItems = inputItems.map((item) => diff --git a/src/pages/instructorRegister/components/InstructorRegisterFunnel/IntroductionStep/index.tsx b/src/pages/instructorRegister/components/InstructorRegisterFunnel/IntroductionStep/index.tsx index cd780e4c..178cddfe 100644 --- a/src/pages/instructorRegister/components/InstructorRegisterFunnel/IntroductionStep/index.tsx +++ b/src/pages/instructorRegister/components/InstructorRegisterFunnel/IntroductionStep/index.tsx @@ -30,7 +30,7 @@ const IntroductionStep = ({ detail, onInfoChange }: IntroductionStepProps) => { return ( <> - +