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: 다크모드 기능 추가 #8

Merged
merged 8 commits into from
Jul 12, 2023
Merged

Conversation

choihansu97
Copy link
Member

#5

작업 내용

  • DarkModeToggle 컴포넌트를 추가하여 다크 모드 기능을 구현
  • useDarkMode 훅을 사용하여 테마 전환

Comment on lines 9 to 10
? window.localStorage.setItem('theme', 'light')
: window.localStorage.setItem('theme', 'dark');

Choose a reason for hiding this comment

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

로컬스토리지를 한번 추상화해서 사용성을 높여보는 방법에 대해 고민 해보면 좋을 것 같습니다.

추가로 로컬스토리지를 사용 할 때 필요한 방어로직에 대해 찾아보세요.

Copy link
Member Author

Choose a reason for hiding this comment

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

1999443#diff-15fcf2ea6bec1201344f5fb46963db5bd5f583b54b9b1184540e647f3ac566b5

로컬 스토리지를 유틸리티 기능으로 추상화하였고, 만료일을 설정해두어서 데이터 만료 처리를 할 수 있도록 수정해봤습니다~

@KwangMin-bright-Moon KwangMin-bright-Moon merged commit d16473f into main Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants