[next] Support login and logout for TalkStreamEmbed (#2081)

* feat: Support login and logout for TalkStreamEmbed

* fix: better test names

* fix: remove obsolete line
This commit is contained in:
Kiwi
2018-11-20 17:48:57 +01:00
committed by GitHub
parent 9af523318c
commit 6fa0c7f538
9 changed files with 148 additions and 52 deletions
@@ -18,7 +18,7 @@ export async function commit(
input: SetAuthTokenInput,
{ localStorage, clearSession }: TalkContext
) {
return await commitLocalUpdatePromisified(environment, async store => {
await commitLocalUpdatePromisified(environment, async store => {
setAuthTokenInLocalState(input.authToken, store);
if (input.authToken) {
await localStorage.setItem("authToken", input.authToken);
@@ -31,6 +31,6 @@ export async function commit(
}
export const withSetAuthTokenMutation = createMutationContainer(
"setCommentID",
"setAuthToken",
commit
);