Skip to content

Commit

Permalink
Explore Need Button Issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sowmya-Raghuram committed Nov 23, 2024
1 parent e5adf49 commit 1a22802
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ function App() {
dispatch(fetchEntities());
}, [dispatch]);


// Handle volunteer status change
const handleVolunteer = (value) => {
setVolunteer(value);
Expand All @@ -220,7 +221,10 @@ function App() {
if (loading) {
return <div>Loading...</div>;
}

// Handle explore button click
if (volunteer) {
return <ExplorePage />;
}
if (presentUser === null) {
return <LoginPage getVolunteerStatus={handleVolunteer} />;
}
Expand Down

0 comments on commit 1a22802

Please sign in to comment.