Fix: web app theme intialization (#14761)

This commit is contained in:
KVOJJJin 2025-03-03 16:05:35 +08:00 • committed by GitHub
commit bb4e7da720
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 12 additions and 59 deletions

View file

@ -5,7 +5,7 @@ import {
RiPlayLargeFill,
} from '@remixicon/react'
import Toast from '@/app/components/base/toast'
import { useAppContext } from '@/context/app-context'
import useTheme from '@/hooks/use-theme'
import { Theme } from '@/types/app'
import cn from '@/utils/classnames'
@ -24,7 +24,7 @@ const AudioPlayer: React.FC<AudioPlayerProps> = ({ src }) => {
const [hasStartedPlaying, setHasStartedPlaying] = useState(false)
const [hoverTime, setHoverTime] = useState(0)
const [isAudioAvailable, setIsAudioAvailable] = useState(true)
const { theme } = useAppContext()
const { theme } = useTheme()
useEffect(() => {
const audio = audioRef.current