Skip to content
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: 시간 요청 및 테마 자동 변경 구현 #181

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

chasj0326
Copy link
Member

@chasj0326 chasj0326 commented Nov 20, 2023

🧩 이슈 번호

✅ 작업 사항

  • msw 작성 (dev api 쓰려했는데 CORS 에러 나네요 ㅠ)
  • 시간에 따라 테마 변경
  • 시간 요청 쿼리

👩‍💻 공유 포인트 및 논의 사항

  • Date 객체 반환합니다

  • App.js 에서 시간을 요청한 후, 시간에 따라 테마가 바뀌게 했습니다 (setTheme)

    • 경계타임(4시)까지 남은 값을 계산 후, 그 이후에 유동적으로 refetch 가 되게 하려했지만 ...
      그 이후의 refetch 시간이 애매해서요 ㅠㅠ.
    • refetchInterval 을 30 분으로 작성하고, refetchWindowFocus 옵션을 줘서 백그라운드에 있다가 웹앱을 열때도 다시 불러오게 했습니다!
  • 이렇게 쓰면 됩니당

const {data} = useQuery(timeOption)

또는

const {data} = useQuery({...timeOption, refetchInterval: ....})

@chasj0326 chasj0326 added ☁️ FE 프론트 레포지토리에서의 작업 ✨ feature 새로운 기능에 대한 작업 labels Nov 20, 2023
@chasj0326 chasj0326 self-assigned this Nov 20, 2023
Copy link

netlify bot commented Nov 20, 2023

Deploy Preview for moabam-storybook ready!

Name Link
🔨 Latest commit d591bf8
🔍 Latest deploy log https://app.netlify.com/sites/moabam-storybook/deploys/655d93231691550008ecbcb6
😎 Deploy Preview https://deploy-preview-181--moabam-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@bbearcookie bbearcookie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!!!

@bbearcookie bbearcookie added this to the 4차 스프린트 milestone Nov 20, 2023
@chasj0326 chasj0326 merged commit b0552a1 into main Nov 22, 2023
5 checks passed
@chasj0326 chasj0326 deleted the feat/#176/server-time-api branch November 22, 2023 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☁️ FE 프론트 레포지토리에서의 작업 ✨ feature 새로운 기능에 대한 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

서버시간 관련 기능 구현
2 participants