From c2d2bece0de01a17dbc6f848be18b16e8d9eb370 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 13 Dec 2020 11:06:13 -0600 Subject: [PATCH] fix: loop --- app/src/react/components/chat/messages/submit/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/react/components/chat/messages/submit/index.jsx b/app/src/react/components/chat/messages/submit/index.jsx index dde72f2..4b6dc46 100644 --- a/app/src/react/components/chat/messages/submit/index.jsx +++ b/app/src/react/components/chat/messages/submit/index.jsx @@ -1,6 +1,6 @@ import './index.scss'; -import {push} from 'connected-react-router'; +import {replace} from 'connected-react-router'; import React, {useRef, useState} from 'react'; import {useDispatch, useSelector} from 'react-redux'; import {v4 as uuidv4} from 'uuid'; @@ -48,7 +48,7 @@ export default function ChatSubmitMessage() { return false; }); if (areNotFriends) { - dispatch(push('/chat')); + dispatch(replace('/chat')); return null; } return (