Skip to content

Commit

Permalink
Merge pull request #2687 from daostack/CW-Webview-back-button
Browse files Browse the repository at this point in the history
CW-Webview-back-button Fix
  • Loading branch information
MeyerPV authored Apr 21, 2024
2 parents 223f83c + cb43cc2 commit d307e6f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/pages/empty/EmptyPage.tsx
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit d307e6f

Please sign in to comment.