Skip to content

Commit

Permalink
feat(UI): added UI rendering feature if no meetings available
Browse files Browse the repository at this point in the history
  • Loading branch information
freaky4wrld committed Nov 12, 2023
1 parent 23e6122 commit 27df8a4
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions client/src/pages/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Home = () => {
<h2>Volunteer Relationship Management System</h2>
</div>

{events && events.length >= 1 && (
{events && events.length > 0 ? (
<div className="meeting-select-container">
<form
className="form-select-meeting"
Expand Down Expand Up @@ -85,21 +85,25 @@ const Home = () => {
</div>
</form>
</div>
)}
):(

<div className="home-buttons">
{/* If no events with checkInReady: true */}
{events.length === 0 && <CreateNewProfileButton />}

{/* If no meetings available*/}
<p>No meetings available</p>
<CreateNewProfileButton />
</div>
)}
{/* If any events with checkInReady: true */}
{events.length > 0 && (
<CheckInButtons
disabled={selectedEvent === ''}
event={selectedEvent}
events={events}
/>
<div className="home-buttons">
<CheckInButtons
disabled={selectedEvent === ''}
event={selectedEvent}
events={events}
/>
</div>
)}
</div>
</div>
);
};
Expand Down

0 comments on commit 27df8a4

Please sign in to comment.