diff --git a/src/pages/empty/EmptyPage.tsx b/src/pages/empty/EmptyPage.tsx index 632864af8c..c4eec74e79 100644 --- a/src/pages/empty/EmptyPage.tsx +++ b/src/pages/empty/EmptyPage.tsx @@ -1,5 +1,19 @@ -import React, { FC } from "react"; +import React, { FC, useEffect } from "react"; +import { useSelector } from "react-redux"; +import { history } from "@/shared/appConfig"; +import { getInboxPagePath } from "@/shared/utils"; +import { selectUser } from "../Auth/store/selectors"; -const EmptyPage: FC = () => null; +const EmptyPage: FC = () => { + const user = useSelector(selectUser()); + + useEffect(() => { + if (user) { + history.push(getInboxPagePath()); + } + }, [user]); + + return null; +}; export default EmptyPage;