mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 23:16:49 +00:00
看板 点击切换主题
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/* eslint-disable no-undef */
|
||||
import BLOG from '@/blog.config'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import { loadExternalResource } from '@/lib/utils'
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
@@ -8,6 +9,7 @@ export default function Live2D () {
|
||||
return <></>
|
||||
}
|
||||
const [init, setInit] = useState()
|
||||
const { switchTheme } = useGlobal()
|
||||
|
||||
// if (typeof window !== 'undefined' && !hasLoad) {
|
||||
// initLive2D()
|
||||
@@ -21,7 +23,7 @@ export default function Live2D () {
|
||||
}
|
||||
}, [init])
|
||||
|
||||
return <canvas id="live2d" className='animate__slideInUp animate__animated' width="280" height="250"/>
|
||||
return <canvas id="live2d" className='animate__slideInUp animate__animated cursor-pointer' width="280" height="250" onClick={switchTheme} alt='切换主题' title='切换主题'/>
|
||||
}
|
||||
|
||||
function initLive2D () {
|
||||
|
||||
Reference in New Issue
Block a user