@@ -6,15 +6,15 @@ import { useTranslation } from 'react-i18next'
66
77import { useCachedAndApi } from '~/utils/api'
88import { urlCover } from '~/utils/url'
9- import { ConfigContext } from '~/contexts/config'
10- import { ThemeContext } from '~/contexts/theme'
9+ import { useConfig } from '~/contexts/config'
10+ import { useTheme } from '~/contexts/theme'
1111import pkg from '~/../package.json'
1212import size from '~/styles/size'
1313import mainStyles from '~/styles/main'
1414import ImageError from '~/components/ImageError'
1515
1616const FavoritedItem = ( { navigation, t } ) => {
17- const theme = React . useContext ( ThemeContext )
17+ const theme = useTheme ( )
1818 const [ isHover , setIsHover ] = React . useState ( false )
1919
2020 return (
@@ -52,8 +52,8 @@ const FavoritedItem = ({ navigation, t }) => {
5252}
5353
5454const PlaylistItem = ( { item, navigation, t } ) => {
55- const config = React . useContext ( ConfigContext )
56- const theme = React . useContext ( ThemeContext )
55+ const config = useConfig ( )
56+ const theme = useTheme ( )
5757 const [ isHover , setIsHover ] = React . useState ( false )
5858
5959 return (
@@ -99,8 +99,8 @@ const PlaylistItem = ({ item, navigation, t }) => {
9999
100100const SideBar = ( { state, descriptors, navigation } ) => {
101101 const insets = useSafeAreaInsets ( )
102- const config = React . useContext ( ConfigContext )
103- const theme = React . useContext ( ThemeContext )
102+ const config = useConfig ( )
103+ const theme = useTheme ( )
104104 const [ hoverIndex , setHoverIndex ] = React . useState ( - 1 )
105105 const [ refresh , setRefresh ] = React . useState ( 0 )
106106 const { t } = useTranslation ( )
0 commit comments