mirror of
https://github.com/wassname/talk.git
synced 2026-07-09 01:04:22 +08:00
Improve styling, accessebility, usability and use mutation
This commit is contained in:
@@ -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");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user