-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FEAT] 이전 달의 미션 캘린더 정보를 볼 수 있다. #469
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
수고하셨습니다!
src/hooks/useCalendar.ts
Outdated
const { queryParams, setQueryParams } = useQueryParams({ queryKey: 'date' }); | ||
const [date, setDate] = useState(queryParams ? dayjs(queryParams) : currentData); | ||
const { monthCalendarData } = getCalenderInfo(date.month() + 1, date.year()); |
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.
👍
src/hooks/useQueryParams.ts
Outdated
/** | ||
* useQueryParams hook - query params를 다루기 위한 hook | ||
* UI 상태를 query params로 관리하기 위한 hook | ||
* @param queryKey | ||
*/ | ||
const useQueryParams = <T extends string>({ queryKey }: { queryKey: T }) => { | ||
const searchParams = useSearchParams(); | ||
const router = useRouter(); | ||
const pathname = usePathname(); | ||
const queryParams = searchParams.get(queryKey) as string | undefined; | ||
|
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.
queryparam 이라는 네이밍을 보고 처음에는 react-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.
useSearchParamState 로 변경할게요
🤔 해결하려는 문제가 무엇인가요?
closed #468
🎉 변경 사항
🙏 여기는 꼭 봐주세요!
사용 방법
🌄 스크린샷
2024-02-05.1.21.24.mov
📚 참고
피그마 : https://www.figma.com/file/waOSgkTYJKQdMHXnGPlOum/%5BDEV%5D-Design-Guide?type=design&node-id=4467-55942&mode=design&t=bxPzMOxk49mU79Eu-11
관련 슬랙 : https://depromeet14th.slack.com/archives/C0647U2UG05/p1707054903589829