-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/#30/job bookmarks page #31
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
Changes from 6 commits
140e5d3
69012d3
04881bf
de758d9
12f8289
cd97243
0c359cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ export default function RecommendationLetterCarousel({ | |
| enableStackTransition = false, | ||
| className, | ||
| }: RecommendationLetterCarouselProps) { | ||
| const hasItems = total > 0; | ||
| const [activeContent, setActiveContent] = useState({ key: contentKey, node: children }); | ||
| const activeContentRef = useRef(activeContent); | ||
| const previousCurrentRef = useRef(current); | ||
|
|
@@ -80,16 +81,14 @@ export default function RecommendationLetterCarousel({ | |
| }; | ||
|
|
||
| return ( | ||
| <div className={cn('flex flex-col items-center gap-4', className)}> | ||
| <div aria-busy={isAnimating} className={cn('flex flex-col items-center gap-4', className)}> | ||
| {filterSlot} | ||
| <div className="flex items-center gap-16"> | ||
| <CarouselArrow | ||
| direction="left" | ||
| onClick={handlePrev} | ||
| disabled={prevDisabled || isAnimating} | ||
| /> | ||
| {hasItems && ( | ||
| <CarouselArrow direction="left" onClick={handlePrev} disabled={prevDisabled} /> | ||
| )} | ||
| {enableStackTransition ? ( | ||
| <div className="relative flex min-h-[524px] w-196 items-center overflow-x-clip"> | ||
| <div className="relative flex min-h-[524px] w-[802px] translate-x-[21px] items-center overflow-x-clip"> | ||
| {leavingContent && ( | ||
| <div | ||
| aria-hidden="true" | ||
|
|
@@ -123,22 +122,29 @@ export default function RecommendationLetterCarousel({ | |
| ) : ( | ||
| children | ||
| )} | ||
| <CarouselArrow | ||
| direction="right" | ||
| onClick={handleNext} | ||
| disabled={nextDisabled || isAnimating} | ||
| /> | ||
| </div> | ||
| <div className="flex items-center gap-2"> | ||
| <CarouselIndicator variant="number" current={current} total={total} /> | ||
| <CarouselIndicator variant="dot" total={total} activeIndex={current - 1} /> | ||
| {hasItems && ( | ||
| <CarouselArrow direction="right" onClick={handleNext} disabled={nextDisabled} /> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 카드 전환 애니메이션이 진행되는 동안에도 화살표 입력이 가능하더라고요. 이 경우 연속으로 클릭하면 애니메이션이 끝나기 전에 handlePrev/handleNext가 다시 호출돼 전환이 꼬일 수 있을 것 같습니다.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이미 handlePrev/handleNext에서 isAnimating에서 가드하고 있어 애니메이션 중 추가 전환은 실행되지 않도록 작성했습니다! 시각적으로만 반영이 안되게 해놨습니다~ |
||
| )} | ||
| </div> | ||
| <p | ||
| aria-hidden={!footNote} | ||
| className="min-h-6 text-body-medium font-medium text-text-tertiary" | ||
| > | ||
| {footNote} | ||
| </p> | ||
| {hasItems ? ( | ||
| <> | ||
| <div className="flex items-center gap-2"> | ||
| <CarouselIndicator variant="number" current={current} total={total} /> | ||
| <CarouselIndicator variant="dot" total={total} activeIndex={current - 1} /> | ||
| </div> | ||
| <p | ||
| aria-hidden={!footNote} | ||
| className="min-h-6 text-heading-medium font-medium text-text-tertiary" | ||
| > | ||
| {footNote} | ||
| </p> | ||
| </> | ||
| ) : ( | ||
| <> | ||
| <div aria-hidden="true" className="h-10" /> | ||
| <div aria-hidden="true" className="h-9" /> | ||
| </> | ||
| )} | ||
| </div> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import Button from '@/components/common/Button'; | ||
| import { ResultIcon } from '@/components/feedback'; | ||
|
|
||
| interface SavedJobsEmptyStateProps { | ||
| title: string; | ||
| description: string; | ||
| onBrowseRecommendations: () => void; | ||
| onExplore: () => void; | ||
| } | ||
|
|
||
| export default function SavedJobsEmptyState({ | ||
| title, | ||
| description, | ||
| onBrowseRecommendations, | ||
| onExplore, | ||
| }: SavedJobsEmptyStateProps) { | ||
| return ( | ||
| <div className="flex min-h-150 w-full max-w-285 self-center flex-col items-center justify-center gap-5"> | ||
| <ResultIcon variant="warning" /> | ||
| <p className="text-center text-heading-medium font-semibold text-text-primary">{title}</p> | ||
| <p className="text-center text-label-medium font-medium text-text-secondary">{description}</p> | ||
| <div className="w-174 border-t border-gray-200" /> | ||
| <Button className="h-14 w-62.5" onClick={onBrowseRecommendations}> | ||
| 오늘의 추천 보기 | ||
| </Button> | ||
| <button | ||
| type="button" | ||
| className="cursor-pointer text-label-large font-medium text-text-tertiary underline decoration-from-font [text-underline-position:from-font]" | ||
| onClick={onExplore} | ||
| > | ||
| 탐색 둘러보기 | ||
| </button> | ||
| </div> | ||
| ); | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.