diff --git a/apps/meteor/client/views/root/hooks/useEscapeKeyStroke.ts b/apps/meteor/client/views/root/hooks/useEscapeKeyStroke.ts index 108db2c88d12..50e746a88ee9 100644 --- a/apps/meteor/client/views/root/hooks/useEscapeKeyStroke.ts +++ b/apps/meteor/client/views/root/hooks/useEscapeKeyStroke.ts @@ -1,15 +1,15 @@ -import { useToastMessageDispatch } from '@rocket.chat/ui-contexts'; +import { useToastMessageDispatch, useRouter } from '@rocket.chat/ui-contexts'; import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { useClearUnreadAllMessagesMutation } from './useClearUnreadAllMessagesMutation'; import GenericModal from '../../../components/GenericModal'; import { imperativeModal } from '../../../lib/imperativeModal'; -import { router } from '/client/providers/RouterProvider'; export const useEscapeKeyStroke = () => { const dispatchToastMessage = useToastMessageDispatch(); const { t } = useTranslation(); + const router = useRouter(); const clearUnreadAllMessagesMutation = useClearUnreadAllMessagesMutation({ onError: (error) => {