diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-02-05 17:35:05 -0500 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-02-05 17:35:05 -0500 |
| commit | 231fed8c645dc29334b946dccca94fbb13116fe2 (patch) | |
| tree | fc7bcd0f9e11b943d89877c621e95681e89a18d7 /src/routes/Routes.tsx | |
| parent | a5f746525df9bb2967c252b70e7a4e2f9daa2b8d (diff) | |
| parent | bad7fac394f8ef2870a9a139fd46d0def4421bf1 (diff) | |
Merge branch 'master' into TMA-579-Redesign-Snapchat-Tiktok
# Conflicts:
# src/components/common/TaggSquareButton.tsx
Diffstat (limited to 'src/routes/Routes.tsx')
| -rw-r--r-- | src/routes/Routes.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/routes/Routes.tsx b/src/routes/Routes.tsx index a14f1576..a5383a47 100644 --- a/src/routes/Routes.tsx +++ b/src/routes/Routes.tsx @@ -7,6 +7,7 @@ import {userLogin} from '../utils'; import SplashScreen from 'react-native-splash-screen'; import messaging from '@react-native-firebase/messaging'; import {updateNewNotificationReceived} from '../store/actions'; +import {fcmService} from '../services'; const Routes: React.FC = () => { const { @@ -39,6 +40,13 @@ const Routes: React.FC = () => { } }, [dispatch, userId]); + useEffect(() => { + if (userId) { + fcmService.setUpPushNotifications(); + fcmService.sendFcmTokenToServer(); + } + }); + return userId ? <NavigationBar /> : <Onboarding />; }; |
