mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fxied #353
This commit is contained in:
@ -1,4 +1,10 @@
|
||||
import React, { createContext, useContext, useEffect, useState } from 'react'
|
||||
import React, {
|
||||
createContext,
|
||||
PropsWithChildren,
|
||||
useContext,
|
||||
useEffect,
|
||||
useState
|
||||
} from 'react'
|
||||
import { AccessibilityInfo } from 'react-native'
|
||||
|
||||
type ContextType = {
|
||||
@ -15,7 +21,7 @@ const AccessibilityContext = createContext<ContextType>({
|
||||
|
||||
export const useAccessibility = () => useContext(AccessibilityContext)
|
||||
|
||||
const AccessibilityManager: React.FC = ({ children }) => {
|
||||
const AccessibilityManager: React.FC<PropsWithChildren> = ({ children }) => {
|
||||
const [reduceMotionEnabled, setReduceMotionEnabled] = useState(false)
|
||||
const [screenReaderEnabled, setScreenReaderEnabled] = useState(false)
|
||||
const [boldTextEnabled, setBoldTextEnabled] = useState(false)
|
||||
|
@ -1,4 +1,10 @@
|
||||
import React, { createContext, useContext, useEffect, useState } from 'react'
|
||||
import React, {
|
||||
createContext,
|
||||
PropsWithChildren,
|
||||
useContext,
|
||||
useEffect,
|
||||
useState
|
||||
} from 'react'
|
||||
import { Appearance } from 'react-native'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { ColorDefinitions, getColors, Theme } from '@utils/styles/themes'
|
||||
@ -74,7 +80,7 @@ const determineTheme = (
|
||||
}
|
||||
}
|
||||
|
||||
const ThemeManager: React.FC = ({ children }) => {
|
||||
const ThemeManager: React.FC<PropsWithChildren> = ({ children }) => {
|
||||
const osTheme = useColorSchemeDelay()
|
||||
const userTheme = useSelector(getSettingsTheme)
|
||||
const darkTheme = useSelector(getSettingsDarkTheme)
|
||||
|
Reference in New Issue
Block a user