-
Notifications
You must be signed in to change notification settings - Fork 0
CLAP-192 내 요청 페이지 API 연결 #57
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
Conversation
| <slot name="listBar" /> | ||
|
|
||
| <div class="overflow-y-auto"> | ||
| <div class="grow overflow-y-auto"> |
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.
이건 커스텀 속성인가요?
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.
아뇨 grow는 flex-grow:1을 부여하는 클래스로 상위 요소가 flex인 경우 다른 요소들이 차지하는 공간을 제외하고 나머지의 공간을 차지하게 하는 속성입니다.
grow를 하여 NoContent 컴포넌트를 위한 공간을 확보해주기 위한 클래스입니다!
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.
상태 상수 변경된 거 확인했습니다
| const { parseRequestParams } = useParseParams() | ||
| const parsedParams = parseRequestParams(params) | ||
| const response = await axiosInstance.get('/api/tasks/requests', { | ||
| headers: { |
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.
로그인 되면 해당 헤더 안쓰셔도 됩니다!
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.
넵! 일단 현재는 원시적으로 직접 토큰값을 저장하여 환경 변수로 사용하고 있는데 이후 로그인 구현 후 그에 맞게 수정하도록 하겠습니다!
| queryFn: fetchRequestList | ||
| }) | ||
| watch( |
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.
이게 useEffect랑 depenency처럼 동작하는거 맞을까요?
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.
네 맞습니다!
watch() 안에 watch가 주시할 변수를 지정하고, 안에 콜백 함수를 통해 해당 변수가 변화 했을 때의 행동을 정의하였습니다.
또한 once 옵션을 통해 처음에 data를 받아왔을 때의 totalPage를 한 번 설정하고, 이후 재설정을 막아 ListPagination 컴포넌트의 반복적인 리렌더링을 막고자 하였습니다!
Minkyu0424
left a comment
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.
고생하셨습니다
#️⃣연관된 티켓 넘버
📝작업 내용
🏞️스크린샷 (선택)
💬리뷰 요구사항(선택)