Skip to content

Commit

Permalink
Adds conditionally rendered content when user search returns an empty…
Browse files Browse the repository at this point in the history
… array
  • Loading branch information
clpetersonucf committed Jan 8, 2024
1 parent 40c636d commit 9165b7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/my-widgets-score-semester-individual.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ const MyWidgetScoreSemesterIndividual = ({ semester, instId }) => {
)
}

else if (state.filteredLogs.length == 0) {
selectedUserRender = <p className='no-user-search-results'>No users match that search.</p>
}

mainContentRender = (
<>
<div className='score-search'>
Expand Down
5 changes: 5 additions & 0 deletions src/components/my-widgets-scores.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@
&.loading {
display: flex;
}

.no-user-search-results {
margin-left: 20px;
font-weight: 700;
}
}

.display.data {
Expand Down

0 comments on commit 9165b7d

Please sign in to comment.