Skip to content

Commit

Permalink
Reload join page on signin
Browse files Browse the repository at this point in the history
  • Loading branch information
itexpert120 committed Nov 9, 2023
1 parent 22634a0 commit e1d91e2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/pages/JoinPage.js
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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 (
<div className="h-100">
{props.signedIn && (
Expand Down

0 comments on commit e1d91e2

Please sign in to comment.