chore: clean up debug code
This commit is contained in:
parent
7f39f319c6
commit
285d8d356d
1 changed files with 0 additions and 19 deletions
|
@ -53,25 +53,6 @@ const meta = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
useEffect(() => {
|
|
||||||
// Check initial state
|
|
||||||
console.log('Initial data-theme:', document.documentElement.getAttribute('data-theme'))
|
|
||||||
console.log('OS prefers dark:', window.matchMedia('(prefers-color-scheme: dark)').matches)
|
|
||||||
|
|
||||||
// Monitor for changes
|
|
||||||
const observer = new MutationObserver((mutations) => {
|
|
||||||
mutations.forEach((mutation) => {
|
|
||||||
if (mutation.attributeName === 'data-theme') {
|
|
||||||
console.log('data-theme changed to:', document.documentElement.getAttribute('data-theme'))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
observer.observe(document.documentElement, { attributes: true })
|
|
||||||
|
|
||||||
return () => observer.disconnect()
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DocusaurusPage DocusaurusLayout={Layout} {...meta} Layout={false}>
|
<DocusaurusPage DocusaurusLayout={Layout} {...meta} Layout={false}>
|
||||||
<div className="tw-max-w-7xl tw-mx-auto tw-my-12 tw-px-4">
|
<div className="tw-max-w-7xl tw-mx-auto tw-my-12 tw-px-4">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue