-
Notifications
You must be signed in to change notification settings - Fork 7
Auth와 Dialog 컴포넌트 + auth 관련하여 RTK 로직 추가, ErrorBoundary 컴포넌트 작성 및 Sentry 연동 #63
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
- 스토리북은 #root 로만 렌더링을 하고 있네요! - nextJS가 사용하는 루트 요소인 __next 아이디를 갖는 div 요소를 추가했습니다.
브라우저 환경일 때 true를 반환하는 process.browser도 있지만 deprecated 될거라고 한다. window 전역객체의 유무를 통해 확인한 후 dom 제어 코드를 실행하도록 조건문 처리해주자.
…develop t # Please enter a commit message to explain why this merge is necessary,
- 서버 인증 실패 시 뜨는 에러메시지 추가, 스타일링 완성
- dialog 컴포넌트의 스타일링을 완성했습니다.
- window type이 undefined가아닐 때 동작하게 했어야 했는데 반대로 해서 수정
- params 로 전달할 경우 제대로 요청이 가지 않아서 url에 넣는 방식으로 수정
- header와 내용 요소 겹치지 않도록 추가했습니다
- Layout에서 사용하기 위해 headerHeight를 내보냈습니다.
- key prop 추가 - .storybook/preview.js 에서 StoreProvider decorator 추가하면서 각 스토리파일에서는 삭제
- redux store 구독 테스트를 위해 스토리북 환경에 StoreProvider wrapping
- Header 우측 menu 또는 login 버튼에 적용될 store의 auth 상태 적용 - hide를 styled component에 맞게 프롭으로 추가
- signout 버튼 동작합니다.
- 더 명확한 코드를 위해 변수명을 변경하고 타입을 정의했습니다.
- justify-content 에 제가 자꾸 s를 붙이네요...
- Header 컴포넌트에 hide 여부를 클래스가 아닌 prop으로 전달해서 styled 컴포넌트에 추가 - Auth 컴포넌트에서 타입 이름을 StyleInputProps에서 StyledInputProps로 변경
| }).then((res) => res.json()); | ||
| export async function getServerSideProps({ query }: ContextProp) { | ||
| const { keyword } = query; | ||
| const { results, totalResults } = await fetch( |
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.
getServerSideProps와 같은 next.js의 환경에서 rtk query를 사용할 순 없을까요? 이 부분 알아보겠습니다.
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.
저도 활용해보려 헀는데 서버사이드라서 RTK query가 제공하는 훅을 사용할 수 없다고만 나왔었어요 알아보고 저도 알려주세요!
hhhyyo
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.
확인했습니다~
| transition: top 0.2s ease-in-out; | ||
| z-index: 10; | ||
| &.hide { |
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.
네 지우고 푸시할게요!!
- @sentry/nextjs 설치하고 @sentry/wizard로 configuration 했습니다. - next.config.js에 Sentry 관련 로직이 추가되었습니다.
- 에러 바운더리 컴포넌트를 적용하고, 에러페이지(_error.tsx)와 에러페이지 (/errorTest) 제작
- 에러바운더리 컴포넌트를 작성했습니다.
- 변경된 yarn.lock 파일입니다.
- 필요없는 코드 삭제했습니다.
- ErrorBoundary component/index에 추가 - _app.tsx에서 절대경로 import 구문으로 수정
- 메뉴에서 signout 후 모달창이 꺼지지 않아서 authcontainer에 onclose 함수를 prop으로 전달해서 signup/signin 하면 showDialog 값을 변경하도록 했습니다.
- RootState와 AuthState로 타입 명시하여 타입에러 해결 - 테스트로 두었던 authUser 기본값을 null로 수정
- react-dom에서 ESLint 문제가 나서 패키지 설치했습니다.
PR Type
What kind of change does this PR introduce?
Related Issues
closed #17
closed #55
solved #25
solved #27
#53
closed #33
What does this PR do?
Other information