🐛 bug: remove message item when hide

:%s
This commit is contained in:
lytrankieio123
2021-09-29 18:00:14 +07:00
parent aa32d6fe27
commit 6c28dc3d7d
3 changed files with 4 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ const MessageItem = memo(
useEffect(() => {
if (isHide && !isMouseOver && onRemove) {
// onRemove(id || 0)
onRemove(id || 0)
}
}, [isHide, isMouseOver, onRemove, id])

View File

@@ -32,7 +32,7 @@ const ModalAuthenticate = ({ visible, mode, closeModal }: Props) => {
closeModal()
router.push(ROUTE.ACCOUNT)
}
}, [customer, visible])
}, [customer, visible, closeModal, router])
const onSwitch = () => {
setIsLogin(!isLogin)

View File

@@ -1,7 +1,7 @@
import { Form, Formik } from 'formik'
import Link from 'next/link'
import React, { useEffect, useRef, useState } from 'react'
import { ButtonCommon, Inputcommon, InputFiledInForm, InputPassword, InputPasswordFiledInForm } from 'src/components/common'
import React, { useEffect, useRef } from 'react'
import { ButtonCommon, InputFiledInForm, InputPasswordFiledInForm } from 'src/components/common'
import { useMessage } from 'src/components/contexts'
import useLogin from 'src/components/hooks/useLogin'
import { ROUTE } from 'src/utils/constanst.utils'