import {CommentThreadType} from './../types/types'; import { MomentType, NotificationType, ProfilePreviewType, ProfileInfoType, ScreenType, SocialAccountType, UserType, UserXType, } from '../types'; export const NO_PROFILE: ProfileInfoType = { biography: '', website: '', name: '', gender: '', birthday: undefined, university_class: 2021, university: undefined, //Default to an invalid value and ignore it gracefully while showing tutorials / popups. profile_completion_stage: -1, suggested_people_linked: -1, snapchat: '', tiktok: '', friendship_status: 'no_record', friendship_requester_id: '', is_private: true, }; export const EMPTY_MOMENTS_LIST = []; export const EMPTY_NOTIFICATIONS_LIST = []; export const NO_USER: UserType = { userId: '', username: '', }; export const EMPTY_PROFILE_PREVIEW_LIST = []; export const NO_USER_DATA = { user: NO_USER, profile: NO_PROFILE, avatar: undefined, cover: undefined, isOnboardedUser: false, newVersionAvailable: false, newNotificationReceived: false, suggestedPeopleImage: '', replyPosted: undefined, }; export const NO_FRIENDS_DATA = { friends: EMPTY_PROFILE_PREVIEW_LIST, }; export const NO_NOTIFICATIONS = { notifications: EMPTY_NOTIFICATIONS_LIST, }; export const NO_MOMENTS = { moments: EMPTY_MOMENTS_LIST, }; export const NO_SOCIAL_ACCOUNTS: Record = { Instagram: {posts: []}, Facebook: {posts: []}, Twitter: {posts: []}, }; export const NO_TAGG_USERS = { recentSearches: EMPTY_PROFILE_PREVIEW_LIST, }; export const NO_SOCIALS = { socialAccounts: NO_SOCIAL_ACCOUNTS, }; export const NO_BLOCKED_USERS = { blockedUsers: EMPTY_PROFILE_PREVIEW_LIST, }; export const EMPTY_MOMENT_CATEGORIES: string[] = []; /** * The dummy userId and username serve the purpose of preventing app crash * For instance, if it may happen that data in our store is not loaded yet for the userXId being visited. * Then we will set the userXId / username to this dummy username / userid */ export const DUMMY_USERID = 'ID-1234-567'; export const DUMMY_USERNAME = 'tagg_userX'; export const EMPTY_USER_X = { friends: EMPTY_PROFILE_PREVIEW_LIST, moments: EMPTY_MOMENTS_LIST, momentCategories: EMPTY_MOMENT_CATEGORIES, socialAccounts: NO_SOCIAL_ACCOUNTS, user: NO_USER, profile: NO_PROFILE, avatar: undefined, cover: undefined, }; /** * A dummy userX to always be there in out initial app state */ export const EMPTY_USERX_LIST = >{ [DUMMY_USERID]: EMPTY_USER_X, }; export const EMPTY_SCREEN_TO_USERS_LIST: Record< ScreenType, Record > = { [ScreenType.Profile]: EMPTY_USERX_LIST, [ScreenType.Search]: EMPTY_USERX_LIST, [ScreenType.Notifications]: EMPTY_USERX_LIST, [ScreenType.SuggestedPeople]: EMPTY_USERX_LIST, }; export const INITIAL_CATEGORIES_STATE = { momentCategories: EMPTY_MOMENT_CATEGORIES, };