1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Use proper environment mapping

This commit is contained in:
Zhiyuan Zheng
2022-01-02 22:28:33 +01:00
parent 22af0bf828
commit 013d55aee2
10 changed files with 99 additions and 40 deletions

View File

@ -41,10 +41,10 @@ const App: React.FC = () => {
Notifications.dismissAllNotificationsAsync()
}, [])
useEffect(() => {
AppState.addEventListener('change', appStateEffect)
const appStateListener = AppState.addEventListener('change', appStateEffect)
return () => {
AppState.removeEventListener('change', appStateEffect)
appStateListener.remove()
}
}, [])