()
| 5 | * To support static rendering, this value needs to be re-calculated on the client side for web |
| 6 | */ |
| 7 | export function useColorScheme() { |
| 8 | const [hasHydrated, setHasHydrated] = useState(false); |
| 9 | |
| 10 | useEffect(() => { |
| 11 | setHasHydrated(true); |
| 12 | }, []); |
| 13 | |
| 14 | const colorScheme = useRNColorScheme(); |
| 15 | |
| 16 | if (hasHydrated) { |
| 17 | return colorScheme; |
| 18 | } |
| 19 | |
| 20 | return 'light'; |
| 21 | } |
no outgoing calls
no test coverage detected