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

next-theme 버그 수정 #28

Merged
merged 7 commits into from
Oct 31, 2023
Merged

next-theme 버그 수정 #28

merged 7 commits into from
Oct 31, 2023

Conversation

dudwns
Copy link
Contributor

@dudwns dudwns commented Oct 31, 2023

📑 이슈 번호

#27

🚧 구현 내용

  • next-hteme hydration 버그 수정
  • Providers 파일명을 파스칼 케이스로 수정
  • ThemeButton 컴포넌트를 common 폴더 내부로 이동
'use client'

import { useEffect, useState } from 'react'
import { ThemeProvider } from 'next-themes'

const Providers = ({ children }: { children: React.ReactNode }) => {
  const [isMount, setMount] = useState(false)

  useEffect(() => {
    setMount(true)
  }, [])

  if (!isMount) {
    return null
  }

  return <ThemeProvider attribute="class">{children}</ThemeProvider>
}

export default Providers

🚨 특이 사항

@dudwns dudwns added the 🐞 Bug Something isn't working label Oct 31, 2023
@dudwns dudwns added this to the 1차 스프린트 milestone Oct 31, 2023
@dudwns dudwns self-assigned this Oct 31, 2023
@dudwns dudwns linked an issue Oct 31, 2023 that may be closed by this pull request
1 task
@dudwns dudwns merged commit b5b6359 into develop Oct 31, 2023
1 check passed
@dudwns dudwns deleted the feature/#27/bug-next-theme branch October 31, 2023 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

next-theme 버그 수정
2 participants