Skip to content

Commit

Permalink
Merge pull request #156 from nigeljacob/Nigel
Browse files Browse the repository at this point in the history
fixed create account issue
  • Loading branch information
nigeljacob authored Mar 25, 2024
2 parents 5ca1ab9 + 3486d9a commit 3e44d4e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 31 deletions.
Binary file modified .DS_Store
Binary file not shown.
54 changes: 25 additions & 29 deletions Frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -502,35 +502,31 @@ function App() {
return (
<>
<div className="titleBar"></div>
{isLoading ? (
<Loading message="Signing In" background={true} />
) : (
<HashRouter>
<Routes>
<Route
path="/"
exact
element={
<Login
setUser={setUser}
setIsLoggedIn={setIsLoggedIn}
loadingTrigger={setLoading}
/>
}
/>
<Route
path="/createAccount"
element={
<CreateAccount
setUser={setUser}
setIsLoggedIn={setIsLoggedIn}
loadingTrigger={setLoading}
/>
}
/>
</Routes>
</HashRouter>
)}
<HashRouter>
<Routes>
<Route
path="/"
exact
element={
<Login
setUser={setUser}
setIsLoggedIn={setIsLoggedIn}
loadingTrigger={setLoading}
/>
}
/>
<Route
path="/createAccount"
element={
<CreateAccount
setUser={setUser}
setIsLoggedIn={setIsLoggedIn}
loadingTrigger={setLoading}
/>
}
/>
</Routes>
</HashRouter>
</>
);
} else if (user != null && isLoggedIn) {
Expand Down
1 change: 0 additions & 1 deletion Frontend/src/Pages/CreateAccount/CreateAccount.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const CreateAccount = (props) => {
});

if (auth.currentUser != null) {
props.loadingTrigger(true)
props.setIsLoggedIn(true);
localStorage.setItem("loggedIN", "true");
localStorage.setItem("currentUser", getCurrentUser);
Expand Down
1 change: 0 additions & 1 deletion Frontend/src/Pages/Login/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function Login(props) {
});

if (auth.currentUser != null) {
props.loadingTrigger(true);
props.setIsLoggedIn(true);
localStorage.setItem("loggedIN", "true");
localStorage.setItem("currentUser", getCurrentUser);
Expand Down

0 comments on commit 3e44d4e

Please sign in to comment.