Skip to content

Commit

Permalink
Merge branch 'canary' into fix/query-refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer authored Jan 31, 2020
2 parents a6d9c1f + d04d976 commit 7c8355f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ function SignIn() {
const passwordElement = event.currentTarget.elements.password

try {
await client.resetStore()
const { data } = await signIn({
variables: {
email: emailElement.value,
password: passwordElement.value,
},
})
client.resetStore()
if (data.signIn.user) {
router.push('/')
await router.push('/')
}
} catch (error) {
setErrorMsg(getErrorMessage(error))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ function SignOut() {
const [signOut] = useMutation(SignOutMutation)

React.useEffect(() => {
if (typeof window !== 'undefined') {
signOut().then(() => {
client.resetStore()
signOut().then(() => {
client.resetStore().then(() => {
router.push('/signin')
})
}
})
}, [signOut, router, client])

return <p>Signing out...</p>
Expand Down

0 comments on commit 7c8355f

Please sign in to comment.