Improve styling, accessebility, usability and use mutation

This commit is contained in:
Chi Vinh Le
2018-08-03 15:57:14 +02:00
parent d05508d574
commit 1376ed255b
21 changed files with 202 additions and 147 deletions
@@ -3,15 +3,15 @@ import { createMutationContainer } from "talk-framework/lib/relay";
import { LOCAL_ID } from "talk-framework/lib/relay/withLocalStateContainer";
export interface SetCommentIDInput {
commentID: string | null;
id: string | null;
}
export type SetCommentIDMutation = (input: SetCommentIDInput) => void;
export type SetCommentIDMutation = (input: SetCommentIDInput) => Promise<void>;
async function commit(environment: Environment, input: SetCommentIDInput) {
return commitLocalUpdate(environment, store => {
const record = store.get(LOCAL_ID)!;
record.setValue(input.commentID, "commentID");
record.setValue(input.id, "commentID");
});
}