Skip to content

Commit

Permalink
[Fix] apply page 카테고리 관련 에러 해결 (#362)
Browse files Browse the repository at this point in the history
* fix: 리뷰 페이지에서 카테고리 좀 더 빨리 사라지게 하기

* fix: 개인정보 수집 동의 여부까지 스크롤 내리면 다시 카테고리 등장하는 에러 해결

* fix: 카테고리 사라져도 클릭 가능한 에러 해결

* refactor: isReview를 이용해서 판단해주기
  • Loading branch information
eonseok-jeon authored Aug 8, 2024
1 parent b4487ee commit 8411275
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/views/ApplyPage/components/ApplyCategory/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import { CATEGORY } from './constant';
import { activeLinkStyle, categoryLinkStyle, categoryList, container } from './style.css';

interface ApplyCategoryProps {
isReview: boolean;
minIndex: number;
}
const ApplyCategory = memo(({ minIndex }: ApplyCategoryProps) => {
const { isScrollingDown, isScrollTop } = useScrollPosition(950);
const ApplyCategory = memo(({ isReview, minIndex }: ApplyCategoryProps) => {
const { isScrollingDown, isScrollTop } = useScrollPosition(isReview ? 380 : 950);

return (
<nav className={container[minIndex !== -1 && isScrollingDown && !isScrollTop ? 'scrollDown' : 'scrollUp']}>
<nav className={container[isScrollingDown && !isScrollTop ? 'scrollDown' : 'scrollUp']}>
<ul className={categoryList}>
{CATEGORY.map(({ index, text, path }) => (
<li key={path}>
Expand Down
2 changes: 2 additions & 0 deletions src/views/ApplyPage/components/ApplyCategory/style.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const container = styleVariants({
containerBase,
{
opacity: 0,
pointerEvents: 'none',
cursor: 'default',
transform: 'translateY(-41px)',
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/views/ApplyPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ const ApplyPage = ({ onSetComplete }: ApplyPageProps) => {
onSubmitData={handleSubmit(handleApplySubmit)}
/>
<ApplyInfo isReview={isReview} />
<ApplyCategory minIndex={minIndex} />
<ApplyCategory isReview={isReview} minIndex={minIndex} />
<form id="apply-form" name="apply-form" onSubmit={handleSubmit(handleApplySubmit)} className={formContainer}>
<DefaultSection
isMakers={isMakers}
Expand Down
2 changes: 1 addition & 1 deletion src/views/ReviewPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const ReviewPage = () => {
<div className={container}>
<ApplyHeader isReview={isReview} />
<ApplyInfo isReview={isReview} />
<ApplyCategory minIndex={minIndex} />
<ApplyCategory isReview={isReview} minIndex={minIndex} />
<form id="apply-form" name="apply-form" className={formContainer}>
<DefaultSection
isMakers={isMakers}
Expand Down

0 comments on commit 8411275

Please sign in to comment.