Skip to content

Commit

Permalink
Merge pull request #328 from isucon/frontend/290_fix-logout-logic
Browse files Browse the repository at this point in the history
[frontend]logoutの修正
  • Loading branch information
ryoha000 authored Jul 9, 2021
2 parents 9ef77e6 + 7742cc6 commit ea3a2d9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Modal from 'react-modal'
import { IoMdLogOut } from 'react-icons/io'
import { Link } from 'react-router-dom'
import { useDispatchContext } from '../../context/state'
import apis from '../../lib/apis'

interface Props {
isOpen: boolean
Expand All @@ -10,7 +11,8 @@ interface Props {

const UserControlModal = (props: Props) => {
const dispatch = useDispatchContext()
const logout = () => {
const logout = async () => {
await apis.postSignout()
dispatch({ type: 'logout' })
}

Expand Down

0 comments on commit ea3a2d9

Please sign in to comment.