move folders etc, need to solve app import issue

This commit is contained in:
Loewy
2024-02-06 14:24:49 -08:00
parent 4a5dd47bc0
commit b5ca868050
48 changed files with 16 additions and 16 deletions

View File

@@ -0,0 +1,16 @@
import { useEffect, useState } from "react";
import { AppState, AppStateStatus } from "react-native";
export const useIsForeground = (): boolean => {
const [isForeground, setIsForeground] = useState(true);
useEffect(() => {
const onChange = (state: AppStateStatus): void => {
setIsForeground(state === "active");
};
const listener = AppState.addEventListener("change", onChange);
return () => listener.remove();
}, [setIsForeground]);
return isForeground;
};