From e1d91e2ca174ac1861be7ddddaf124a3fa954377 Mon Sep 17 00:00:00 2001 From: Zeeshan Ahmad Date: Thu, 9 Nov 2023 17:57:17 +0500 Subject: [PATCH] Reload join page on signin --- src/pages/JoinPage.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 && (