-
Notifications
You must be signed in to change notification settings - Fork 2
feat: SP1 이용 가이드 뷰 구현 #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export const GUIDE_IMAGES = [ | ||
| { id: 1, src: 'images/guide_image_1.webp', alt: '가이드 1' }, | ||
| { id: 2, src: 'images/guide_image_2.webp', alt: '가이드 2' }, | ||
| { id: 3, src: 'images/guide_image_3.webp', alt: '가이드 3' }, | ||
| { id: 4, src: 'images/guide_image_4.webp', alt: '가이드 4' }, | ||
| { id: 5, src: 'images/guide_image_5.webp', alt: '가이드 5' }, | ||
| { id: 6, src: 'images/guide_image_6.webp', alt: '가이드 6' }, | ||
| ] as const; | ||
|
|
||
| export type GuideImage = (typeof GUIDE_IMAGES)[number]; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import CarouselIndicator from '@pages/match/groups/components/carousel_indicator'; | ||
| import { useSlide } from '@pages/match/hooks/useSlide'; | ||
| import { getSlideTransformStyle } from '@pages/match/styles/get-slide-transformstyle'; | ||
| import { useState } from 'react'; | ||
| import { GUIDE_IMAGES } from './constants/guide-images'; | ||
|
|
||
| const Guide = () => { | ||
| const [currentIndex, setCurrentIndex] = useState(0); | ||
|
|
||
| const { handleTouchStart, handleTouchEnd, handleMouseDown } = useSlide({ | ||
| length: GUIDE_IMAGES.length, | ||
| currentIndex, | ||
| onChange: setCurrentIndex, | ||
| }); | ||
|
|
||
| return ( | ||
| <section | ||
| className="w-full flex-col gap-[2.4rem] overflow-hidden " | ||
| aria-label="가이드 이미지 캐러셀" | ||
| > | ||
| <ul | ||
| className="flex pt-[3.2rem] transition-transform duration-300 ease-in-out" | ||
| style={getSlideTransformStyle(currentIndex)} | ||
| onTouchStart={handleTouchStart} | ||
| onTouchEnd={handleTouchEnd} | ||
| onMouseDown={handleMouseDown} | ||
| aria-roledescription="carousel" | ||
| aria-live="polite" | ||
| > | ||
| {GUIDE_IMAGES.map((image, index) => ( | ||
| <li | ||
| key={image.id} | ||
| aria-roledescription="slide" | ||
| aria-label={`가이드 이미지 ${index + 1} / ${GUIDE_IMAGES.length}`} | ||
| aria-hidden={index !== currentIndex} | ||
| className="min-w-full px-[0.8rem]" | ||
| > | ||
| <div className="box-border min-w-full flex-row-center "> | ||
| <img src={image.src} alt={image.alt} className="h-auto w-full " /> | ||
| </div> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
|
|
||
| <div className="flex-row-center"> | ||
| <CarouselIndicator | ||
| ids={GUIDE_IMAGES.map((image) => `guide-${image.id}`)} | ||
| currentIndex={currentIndex} | ||
| onDotClick={setCurrentIndex} | ||
| /> | ||
| </div> | ||
| </section> | ||
| ); | ||
| }; | ||
|
|
||
| export default Guide; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,4 +19,5 @@ export const ROUTES = { | |
| ERROR: '/error', | ||
| LOADING: '/loading', | ||
| SPLASH: '/splash', | ||
| GUIDE: '/guide', | ||
| }; | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
이미지 상수 정의 적절하나 접근성/경로 확인 권장
이미지 자산 존재와 로딩 경로를 점검하는 스크립트입니다.
🏁 Script executed:
Length of output: 1849
이미지 자산 미존재, 경로 및 접근성 문제 해결 필요
src/pages/guide/constants/guide-images.ts에서 참조하는images/guide_image_*.webp파일이 리포지토리에 없습니다.images/...는 빌드 환경에서/guide/.../images/...등으로 잘못 해석될 수 있으니 public 기준 절대경로(/images/...)로 변경하거나 빌드 설정에서 경로 해석 방식을 검증하세요.alt="가이드 N"이 aria-label(가이드 이미지 N / 6)과 중복되어 스크린리더에서 중복 안내가 발생합니다. 정보 전달용이면 더 구체적 설명, 장식용이면alt=""및aria-hidden적용 바랍니다.🤖 Prompt for AI Agents