CFE-11 change transport protocol socket and fixed bug toast container connection

This commit is contained in:
AmirHossein Mahmoodi
2023-11-01 09:19:37 +03:30
parent 81ad055720
commit 71f82ef640
3 changed files with 11 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ const NetworkComponent = () => {
const t = useTranslations()
useEffect(() => {
console.log(network.online)
if (network.online) {
toast.update(networkToastId.current, {
type: toast.TYPE.SUCCESS,
@@ -23,6 +24,8 @@ const NetworkComponent = () => {
return
}
networkToastId.current = toast.warn(t('offline_message'), {
containerId: 'connection',
draggable: false,
autoClose: false, closeButton: false, closeOnClick: false, icon: <WifiOffIcon/>
})
}, [network.online]);