Skip to content

Commit 4543182

Browse files
authored
Merge pull request #2688 from daostack/CW-Webview-fix-backbutton
[HOTFIX] BackButton Fix webview
2 parents 157e4c7 + 400d050 commit 4543182

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/pages/empty/EmptyPage.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1-
import React, { FC } from "react";
1+
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";
26

3-
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+
};
418

519
export default EmptyPage;

0 commit comments

Comments
 (0)