diff --git a/src/pages/JoinPage.js b/src/pages/JoinPage.js index e5ed554a..9159a52a 100644 --- a/src/pages/JoinPage.js +++ b/src/pages/JoinPage.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import { UserDropdown } from "../components/navigation/desktop/UserDropdown"; import { Widget } from "near-social-vm"; import { useBosLoaderStore } from "../stores/bos-loader"; @@ -9,7 +9,16 @@ export default function JoinPage(props) { const CurrentView = props.signedIn ? "buildhub.near/widget/create-something" : "buildhub.near/widget/login"; - + + useEffect(() => { + if ( + props.signedIn === true && + CurrentView === "buildhub.near/widget/login" + ) { + window.location.reload(); + } + }, [props.signedIn]); + return (
{props.signedIn && (