From bd2f89805d0bb1c2f1d08fe8d91099aa4f109d35 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Tue, 29 Dec 2020 20:21:24 -0500 Subject: [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> --- src/store/initialStates.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/store/initialStates.ts') diff --git a/src/store/initialStates.ts b/src/store/initialStates.ts index 8f4a2e84..b75569d6 100644 --- a/src/store/initialStates.ts +++ b/src/store/initialStates.ts @@ -1,11 +1,13 @@ -import {MomentCategoryType, MomentType} from '../types'; import { - ProfileType, - SocialAccountType, + MomentCategoryType, + MomentType, + NotificationType, ProfilePreviewType, + ProfileType, ScreenType, - UserXType, + SocialAccountType, UserType, + UserXType, } from '../types'; export const NO_PROFILE: ProfileType = { @@ -20,6 +22,8 @@ export const NO_PROFILE: ProfileType = { export const EMPTY_MOMENTS_LIST = []; +export const EMPTY_NOTIFICATIONS_LIST = []; + export const NO_USER: UserType = { userId: '', username: '', @@ -34,6 +38,10 @@ export const NO_USER_DATA = { cover: '', }; +export const NO_NOTIFICATIONS = { + notifications: EMPTY_NOTIFICATIONS_LIST, +}; + export const NO_FOLLOW_DATA = { followers: EMPTY_PROFILE_PREVIEW_LIST, following: EMPTY_PROFILE_PREVIEW_LIST, @@ -113,6 +121,7 @@ export const EMPTY_SCREEN_TO_USERS_LIST: Record< > = { [ScreenType.Profile]: EMPTY_USERX_LIST, [ScreenType.Search]: EMPTY_USERX_LIST, + [ScreenType.Notifications]: EMPTY_USERX_LIST, }; export const INITIAL_CATEGORIES_STATE = { -- cgit v1.2.3-70-g09d2