We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 157e4c7 + 400d050 commit 4543182Copy full SHA for 4543182
src/pages/empty/EmptyPage.tsx
@@ -1,5 +1,19 @@
1
-import React, { FC } from "react";
+import React, { FC, useEffect } from "react";
2
+import { useSelector } from "react-redux";
3
+import { history } from "@/shared/appConfig";
4
+import { getInboxPagePath } from "@/shared/utils";
5
+import { selectUser } from "../Auth/store/selectors";
6
-const EmptyPage: FC = () => null;
7
+const EmptyPage: FC = () => {
8
+ const user = useSelector(selectUser());
9
+
10
+ useEffect(() => {
11
+ if (user) {
12
+ history.push(getInboxPagePath());
13
+ }
14
+ }, [user]);
15
16
+ return null;
17
+};
18
19
export default EmptyPage;
0 commit comments