Unverified Commit ef3caa55 authored by Miguel Alatzar's avatar Miguel Alatzar Committed by GitHub
Browse files

Fix flow type for post reactions (#778)

[MM-13954] Fix flow type for post reactions
parent 5c80de80
......@@ -32,11 +32,11 @@ export function getPostsInThread(state: GlobalState): RelationOneToMany<Post, Po
return state.entities.posts.postsInThread;
}
export function getReactionsForPosts(state: GlobalState): RelationOneToOne<Post, Array<Reaction>> {
export function getReactionsForPosts(state: GlobalState): RelationOneToOne<Post, {[string]: Reaction}> {
return state.entities.posts.reactions;
}
export function makeGetReactionsForPost(): (GlobalState, $ID<Post>) => ?Array<Reaction> {
export function makeGetReactionsForPost(): (GlobalState, $ID<Post>) => ?{[string]: Reaction} {
return createSelector(
getReactionsForPosts,
(state: GlobalState, postId) => postId,
......
......@@ -83,7 +83,7 @@ export type PostsState = {|
posts: IDMappedObjects<Post>,
postsInChannel: RelationOneToMany<Channel, Post>,
postsInThread: RelationOneToMany<Post, Post>,
reactions: RelationOneToOne<Post, Array<Reaction>>,
reactions: RelationOneToOne<Post, {[string]: Reaction}>,
openGraph: RelationOneToOne<Post, Object>,
sendingPostIds: Array<string>,
selectedPostId: string,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment