Datastores
FeedListDataStore
Key | Type | Description | Optional |
---|---|---|---|
selectedTopics | string[] | Array of selected topic IDs | |
setSelectedTopics | React.Dispatch<React.SetStateAction<string[]>> | Function to update selected topics | |
topics | Record<string, Topic> | Record of topics indexed by their IDs | |
setTopics | React.Dispatch<React.SetStateAction<Record<string, Topic>> | Function to update the topics record | |
widgets | Record<string, any> | Record of widgets indexed by their IDs | |
setWidgets | React.Dispatch<React.SetStateAction<Record<string, any>> | Function to update the widgets record | |
loadMoreFeeds | boolean | Flag indicating whether to load more feeds | |
setLoadMoreFeeds | React.Dispatch<React.SetStateAction<boolean>> | Function to update the loadMoreFeeds flag | |
currentPageCount | number | Current page count of the feed list | |
setCurrentPageCount | React.Dispatch<React.SetStateAction<number>> | Function to update the current page count | |
feedList | Post[] | Array of posts in the feed list | |
setFeedList | React.Dispatch<React.SetStateAction<Post[]>> | Function to update the feed list | |
feedUsersList | Record<string, User> | Record of users associated with the feeds | |
setFeedUsersList | React.Dispatch<React.SetStateAction<Record<string, User>>> | Function to update the feed users list |
FeedPostDetailsStore
Key | Type | Description | Optional |
---|---|---|---|
post | Post | null | The current post | |
setPost | React.Dispatch<React.SetStateAction<Post | null>> | Function to update the current post | |
users | Record<string, User> | Record of users associated with the post | |
setUsers | React.Dispatch<React.SetStateAction<Record<string, User>>> | Function to update the users record | |
replies | Reply[] | Array of replies to the post | |
setReplies | React.Dispatch<React.SetStateAction<Reply[]>> | Function to update the replies array | |
loadNextPage | boolean | Flag indicating whether to load the next page | |
setLoadNextPage | React.Dispatch<React.SetStateAction<boolean>> | Function to update the loadNextPage flag | |
topics | Record<string, Topic> | Record of topics associated with the post | |
widgets | Record<string, any> | Record of widgets associated with the post | |
setWidgets | React.Dispatch<React.SetStateAction<Record<string, any>>> | Function to update the widgets record | |
setTopics | React.Dispatch<React.SetStateAction<Record<string, Topic>>> | Function to update the topics record | |
pageCount | number | Current page count of replies | |
setPageCount | React.Dispatch<React.SetStateAction<number>> | Function to update the page count |
NotificationsDataStore
Key | Type | Description | Optional |
---|---|---|---|
notifications | Activity[] | Array of notification activities | No |
setNotifications | React.Dispatch<React.SetStateAction<Activity[]>> | Function to update the notifications array | No |
users | Record<string, User> | Mapping of user IDs to User objects | No |
setUsers | React.Dispatch<React.SetStateAction<Record<string, User>>> | Function to update the users mapping | No |
shouldLoadMoreNotifications | boolean | Flag indicating whether more notifications should be loaded | No |
setShouldLoadMoreNotifications | React.Dispatch<React.SetStateAction<boolean>> | Function to update the shouldLoadMoreNotifications flag | No |
notificationCount | number | Total count of notifications | No |
setNotificationCount | React.Dispatch<React.SetStateAction<number>> | Function to update the notification count | No |
notificationPage | number | Current page number of notifications | No |
setNotificationPage | React.Dispatch<React.SetStateAction<number>> | Function to update the notification page number | No |
TopicDataStore
Key | Type | Description | Optional |
---|---|---|---|
checkedTopics | Topic[] | Array of topics that are currently checked | No |
setCheckedTopics | React.Dispatch<React.SetStateAction<Topic[]>> | Function to update the checked topics | No |
loadNewTopics | boolean | Flag indicating whether to load new topics | No |
setLoadNewTopics | React.Dispatch<React.SetStateAction<boolean>> | Function to set the load new topics flag | No |
topics | Topic[] | Array of all available topics | No |
setTopics | React.Dispatch<React.SetStateAction<Topic[]>> | Function to update the topics list | No |
currentPageCount | number | Current number of pages loaded | No |
setCurrentPageCount | React.Dispatch<React.SetStateAction<number>> | Function to update the current page count | No |
searchKey | string | Key used for searching topics | No |
setSearchKey | React.Dispatch<React.SetStateAction<string>> | Function to update the search key | No |
UserDataStore
Key | Type | Description | Optional |
---|---|---|---|
lmFeedUser | User | null | The current user in the LikeMinds feed | Yes |
logOutUser | (() => void) | null | Function to log out the user | Yes |
lmFeedUserCurrentCommunity | Community | null | The user's current community in the LikeMinds feed | Yes |
GeneralDataStore
Key | Type | Description | Optional |
---|---|---|---|
displaySnackbarMessage | (message: string) => void | Function to display a snackbar message | Yes |
closeSnackbar | () => void | Function to close the snackbar | Yes |
showSnackbar | boolean | Flag indicating whether to show the snackbar | Yes |
message | string | The message to display in the snackbar | Yes |
RepliesDataStore
Key | Type | Description | Optional |
---|---|---|---|
reply | Reply | null | The current reply object | No |
setReply | React.Dispatch<React.SetStateAction<Reply | null>> | Function to update the current reply | No |
pageCount | number | Current page count for pagination | No |
setPageCount | React.Dispatch<React.SetStateAction<number>> | Function to update the page count | No |
loadMoreReplies | boolean | Flag indicating whether to load more replies | No |
setLoadMoreReplies | React.Dispatch<React.SetStateAction<boolean>> | Function to update the load more replies flag | No |
replies | Reply[] | Array of reply objects | No |
setReplies | React.Dispatch<React.SetStateAction<Reply[]>> | Function to update the replies array | No |
users | Record<string, User> | Mapping of user IDs to User objects | No |
setUser | React.Dispatch<React.SetStateAction<Record<string, User>>> | Function to update the users mapping | No |
PostCreationDataStore
Key | Type | Description | Optional |
---|---|---|---|
openCreatePostDialog | boolean | Indicates if the create post dialog is open | false |
setOpenCreatePostDialog | React.Dispatch<React.SetStateAction<boolean>> | Function to set the open state of the dialog | false |
showOGTagViewContainer | boolean | Indicates if the OG tag view container is shown | false |
setShowOGTagViewContainer | React.Dispatch<React.SetStateAction<boolean>> | Function to set the visibility of the OG tag container | false |
text | string | null | The text content of the post | false |
setText | React.Dispatch<React.SetStateAction<string | null>> | Function to set the text content | false |
temporaryPost | Post | null | The temporary post object | false |
setTemporaryPost | React.Dispatch<React.SetStateAction<Post | null>> | Function to set the temporary post | false |
mediaList | File[] | List of media files attached to the post | false |
setMediaList | React.Dispatch<React.SetStateAction<File[]>> | Function to set the list of media files | false |
selectedTopicIds | string[] | Array of selected topic IDs | false |
setSelectedTopicIds | React.Dispatch<React.SetStateAction<string[]>> | Function to set selected topic IDs | false |
preSelectedTopics | Topic[] | Array of pre-selected topics | false |
setPreSelectedTopics | React.Dispatch<React.SetStateAction<Topic[]>>> | Function to set pre-selected topics | false |
mediaUploadMode | LMFeedCreatePostMediaUploadMode | The media upload mode for the post | false |
setMediaUploadMode | React.Dispatch<React.SetStateAction<LMFeedCreatePostMediaUploadMode>> | Function to set the media upload mode | false |
ogTag | OgTag | null | The Open Graph tag data | false |
setOgtag | React.Dispatch<React.SetStateAction<OgTag | null>> | Function to set the OG tag data | false |
textFieldRef | React.MutableRefObject<HTMLDivElement | null> | Reference to the text field element | false |
containerRef | React.MutableRefObject<HTMLDivElement | null> | Reference to the container element | false |
isAnonymousPost | boolean | Indicates if the post is anonymous | false |
changeAnonymousPostStatus | (value: boolean) => void | Function to change the anonymous status of the post | false |
ApplicationGeneralsStore
Key | Type | Description | Optional |
---|---|---|---|
userDataStore | UserDataStore | The store containing user-specific data | No |
generalDataStore | GeneralDataStore | The store containing general application data | No |