diff options
author | Ivan Chen <ivan@thetaggid.com> | 2020-12-29 20:21:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 20:21:24 -0500 |
commit | bd2f89805d0bb1c2f1d08fe8d91099aa4f109d35 (patch) | |
tree | ac7219e034a0c4035096c6df8dbe6b92446b5111 /src/utils/users.ts | |
parent | ec478d4981c726856485b49b49ac33b0d9e6a903 (diff) |
[TMA-461] Notifications Screen (#151)
* renamed ProfileStack to MainStack, created initial notifications data type
* cleaned up code
* added notifications to redux
* finished sectioned list
* updated types to make more sense
* finished sectioned notifications by date
* updated notification type and tested mock backend integration
* finished read or unread logic
* minor changes
* another minor fix
* finished integration
* moved stuff
* added ability to navigate to user profile
Co-authored-by: Husam Salhab <47015061+hsalhab@users.noreply.github.com>
Diffstat (limited to 'src/utils/users.ts')
-rw-r--r-- | src/utils/users.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/utils/users.ts b/src/utils/users.ts index 4f93347d..be92d184 100644 --- a/src/utils/users.ts +++ b/src/utils/users.ts @@ -1,10 +1,6 @@ -import {loadUserMomentCategories} from './../store/actions/momentCategories'; -import {loadUserX} from './../store/actions/userX'; -import {RootState} from './../store/rootReducer'; import AsyncStorage from '@react-native-community/async-storage'; -import {AppDispatch} from './../store/configureStore'; -import {UserType, ScreenType} from './../types/types'; import {INTEGRATED_SOCIAL_LIST} from '../constants'; +import {loadSocialPosts} from '../services'; import { loadAllSocials, loadBlockedList, @@ -12,10 +8,15 @@ import { loadRecentlySearched, loadUserData, loadUserMoments, + loadUserNotifications, } from '../store/actions'; import {NO_SOCIAL_ACCOUNTS} from '../store/initialStates'; -import {loadSocialPosts} from '../services'; import {userLoggedIn} from '../store/reducers'; +import {loadUserMomentCategories} from './../store/actions/momentCategories'; +import {loadUserX} from './../store/actions/userX'; +import {AppDispatch} from './../store/configureStore'; +import {RootState} from './../store/rootReducer'; +import {ScreenType, UserType} from './../types/types'; const loadData = async (dispatch: AppDispatch, user: UserType) => { await Promise.all([ @@ -23,6 +24,7 @@ const loadData = async (dispatch: AppDispatch, user: UserType) => { dispatch(loadFollowData(user.userId)), dispatch(loadUserMomentCategories(user.userId)), dispatch(loadUserMoments(user.userId)), + dispatch(loadUserNotifications()), dispatch(loadAllSocials(user.userId)), dispatch(loadBlockedList(user.userId)), dispatch(loadRecentlySearched()), |