Skip to main content

Datastores

FeedListDataStore

KeyTypeDescriptionOptional
selectedTopicsstring[]Array of selected topic IDs
setSelectedTopicsReact.Dispatch<React.SetStateAction<string[]>>Function to update selected topics
topicsRecord<string, Topic>Record of topics indexed by their IDs
setTopicsReact.Dispatch<React.SetStateAction<Record<string, Topic>>Function to update the topics record
widgetsRecord<string, any>Record of widgets indexed by their IDs
setWidgetsReact.Dispatch<React.SetStateAction<Record<string, any>>Function to update the widgets record
loadMoreFeedsbooleanFlag indicating whether to load more feeds
setLoadMoreFeedsReact.Dispatch<React.SetStateAction<boolean>>Function to update the loadMoreFeeds flag
currentPageCountnumberCurrent page count of the feed list
setCurrentPageCountReact.Dispatch<React.SetStateAction<number>>Function to update the current page count
feedListPost[]Array of posts in the feed list
setFeedListReact.Dispatch<React.SetStateAction<Post[]>>Function to update the feed list
feedUsersListRecord<string, User>Record of users associated with the feeds
setFeedUsersListReact.Dispatch<React.SetStateAction<Record<string, User>>>Function to update the feed users list

FeedPostDetailsStore

KeyTypeDescriptionOptional
postPost | nullThe current post
setPostReact.Dispatch<React.SetStateAction<Post | null>> Function to update the current post
usersRecord<string, User>Record of users associated with the post
setUsersReact.Dispatch<React.SetStateAction<Record<string, User>>>Function to update the users record
repliesReply[]Array of replies to the post
setRepliesReact.Dispatch<React.SetStateAction<Reply[]>>Function to update the replies array
loadNextPagebooleanFlag indicating whether to load the next page
setLoadNextPageReact.Dispatch<React.SetStateAction<boolean>>Function to update the loadNextPage flag
topicsRecord<string, Topic>Record of topics associated with the post
widgetsRecord<string, any>Record of widgets associated with the post
setWidgetsReact.Dispatch<React.SetStateAction<Record<string, any>>>Function to update the widgets record
setTopicsReact.Dispatch<React.SetStateAction<Record<string, Topic>>>Function to update the topics record
pageCountnumberCurrent page count of replies
setPageCountReact.Dispatch<React.SetStateAction<number>>Function to update the page count

NotificationsDataStore

KeyTypeDescriptionOptional
notificationsActivity[]Array of notification activitiesNo
setNotificationsReact.Dispatch<React.SetStateAction<Activity[]>>Function to update the notifications arrayNo
usersRecord<string, User>Mapping of user IDs to User objectsNo
setUsersReact.Dispatch<React.SetStateAction<Record<string, User>>>Function to update the users mappingNo
shouldLoadMoreNotificationsbooleanFlag indicating whether more notifications should be loadedNo
setShouldLoadMoreNotificationsReact.Dispatch<React.SetStateAction<boolean>>Function to update the shouldLoadMoreNotifications flagNo
notificationCountnumberTotal count of notificationsNo
setNotificationCountReact.Dispatch<React.SetStateAction<number>>Function to update the notification countNo
notificationPagenumberCurrent page number of notificationsNo
setNotificationPageReact.Dispatch<React.SetStateAction<number>>Function to update the notification page numberNo

TopicDataStore

KeyTypeDescriptionOptional
checkedTopicsTopic[]Array of topics that are currently checkedNo
setCheckedTopicsReact.Dispatch<React.SetStateAction<Topic[]>>Function to update the checked topicsNo
loadNewTopicsbooleanFlag indicating whether to load new topicsNo
setLoadNewTopicsReact.Dispatch<React.SetStateAction<boolean>>Function to set the load new topics flagNo
topicsTopic[]Array of all available topicsNo
setTopicsReact.Dispatch<React.SetStateAction<Topic[]>>Function to update the topics listNo
currentPageCountnumberCurrent number of pages loadedNo
setCurrentPageCountReact.Dispatch<React.SetStateAction<number>>Function to update the current page countNo
searchKeystringKey used for searching topicsNo
setSearchKeyReact.Dispatch<React.SetStateAction<string>>Function to update the search keyNo

UserDataStore

KeyTypeDescriptionOptional
lmFeedUserUser | nullThe current user in the LikeMinds feedYes
logOutUser(() => void) | nullFunction to log out the userYes
lmFeedUserCurrentCommunityCommunity | nullThe user's current community in the LikeMinds feedYes

GeneralDataStore

KeyTypeDescriptionOptional
displaySnackbarMessage(message: string) => voidFunction to display a snackbar messageYes
closeSnackbar() => voidFunction to close the snackbarYes
showSnackbarbooleanFlag indicating whether to show the snackbarYes
messagestringThe message to display in the snackbarYes

RepliesDataStore

KeyTypeDescriptionOptional
replyReply | nullThe current reply objectNo
setReplyReact.Dispatch<React.SetStateAction<Reply | null>>Function to update the current replyNo
pageCountnumberCurrent page count for paginationNo
setPageCountReact.Dispatch<React.SetStateAction<number>>Function to update the page countNo
loadMoreRepliesbooleanFlag indicating whether to load more repliesNo
setLoadMoreRepliesReact.Dispatch<React.SetStateAction<boolean>>Function to update the load more replies flagNo
repliesReply[]Array of reply objectsNo
setRepliesReact.Dispatch<React.SetStateAction<Reply[]>>Function to update the replies arrayNo
usersRecord<string, User>Mapping of user IDs to User objectsNo
setUserReact.Dispatch<React.SetStateAction<Record<string, User>>>Function to update the users mappingNo

PostCreationDataStore

KeyTypeDescriptionOptional
openCreatePostDialogbooleanIndicates if the create post dialog is openfalse
setOpenCreatePostDialogReact.Dispatch<React.SetStateAction<boolean>>Function to set the open state of the dialogfalse
showOGTagViewContainerbooleanIndicates if the OG tag view container is shownfalse
setShowOGTagViewContainerReact.Dispatch<React.SetStateAction<boolean>>Function to set the visibility of the OG tag containerfalse
textstring | nullThe text content of the postfalse
setTextReact.Dispatch<React.SetStateAction<string | null>>Function to set the text contentfalse
temporaryPostPost | nullThe temporary post objectfalse
setTemporaryPostReact.Dispatch<React.SetStateAction<Post | null>>Function to set the temporary postfalse
mediaListFile[]List of media files attached to the postfalse
setMediaListReact.Dispatch<React.SetStateAction<File[]>>Function to set the list of media filesfalse
selectedTopicIdsstring[]Array of selected topic IDsfalse
setSelectedTopicIdsReact.Dispatch<React.SetStateAction<string[]>>Function to set selected topic IDsfalse
preSelectedTopicsTopic[]Array of pre-selected topicsfalse
setPreSelectedTopicsReact.Dispatch<React.SetStateAction<Topic[]>>>Function to set pre-selected topicsfalse
mediaUploadModeLMFeedCreatePostMediaUploadModeThe media upload mode for the postfalse
setMediaUploadModeReact.Dispatch<React.SetStateAction<LMFeedCreatePostMediaUploadMode>>Function to set the media upload modefalse
ogTagOgTag | nullThe Open Graph tag datafalse
setOgtagReact.Dispatch<React.SetStateAction<OgTag | null>>Function to set the OG tag datafalse
textFieldRefReact.MutableRefObject<HTMLDivElement | null>Reference to the text field elementfalse
containerRefReact.MutableRefObject<HTMLDivElement | null>Reference to the container elementfalse
isAnonymousPostbooleanIndicates if the post is anonymousfalse
changeAnonymousPostStatus(value: boolean) => voidFunction to change the anonymous status of the postfalse

ApplicationGeneralsStore

KeyTypeDescriptionOptional
userDataStoreUserDataStoreThe store containing user-specific dataNo
generalDataStoreGeneralDataStoreThe store containing general application dataNo