diff options
| author | Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> | 2020-12-29 11:41:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-29 14:41:57 -0500 |
| commit | 05cd91206a6ce3361097d9eb408a447eae3d120e (patch) | |
| tree | 1b8c5ba82358c3f9b393ea42d03b6c9c7219ce7f /src/screens/onboarding/Login.tsx | |
| parent | efaa41884b5aa4b4704380eb3615d3801958a775 (diff) | |
[TMA-288] notifications frontend infra (#154)
* Configured settings to enable remote notifications
* Added FCM services
* Added background message handler + api calls
* minor fixes
* minor changes requested from pr
Diffstat (limited to 'src/screens/onboarding/Login.tsx')
| -rw-r--r-- | src/screens/onboarding/Login.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/screens/onboarding/Login.tsx b/src/screens/onboarding/Login.tsx index 1315fdf5..3e59b00e 100644 --- a/src/screens/onboarding/Login.tsx +++ b/src/screens/onboarding/Login.tsx @@ -12,7 +12,7 @@ import { KeyboardAvoidingView, Platform, } from 'react-native'; - +import {fcmService} from '../../services'; import {OnboardingStackParams} from '../../routes/onboarding'; import {Background, TaggInput, SubmitButton} from '../../components'; import {usernameRegex, LOGIN_ENDPOINT} from '../../constants'; @@ -164,6 +164,7 @@ const Login: React.FC<LoginProps> = ({navigation}: LoginProps) => { await AsyncStorage.setItem('userId', data.UserID); await AsyncStorage.setItem('username', username); userLogin(dispatch, {userId: data.UserID, username}); + fcmService.sendFcmTokenToServer(); } catch (err) { setUser(NO_USER); console.log(data); |
