Skip to content

Commit

Permalink
chore: add message to list when no commits found
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgamache committed Oct 25, 2024
1 parent 0264469 commit c4d44fe
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@ export const ComplaintList: FC<Props> = ({ type, searchQuery }) => {
}
};

const renderNoComplaintsFound = () => {
return (
<td colSpan={11}>
<i className="bi bi-info-circle-fill"></i>
<span>No complaints found using your current filters. Remove or change your filters to see complaints.</span>
</td>
);
};

return (
<div className="comp-table-container">
<div
Expand All @@ -210,6 +219,7 @@ export const ComplaintList: FC<Props> = ({ type, searchQuery }) => {
>
{renderComplaintListHeader(type)}
<tbody>
{totalComplaints === 0 && renderNoComplaintsFound()}
{complaints.map((item) => {
const { id } = item;

Expand Down

0 comments on commit c4d44fe

Please sign in to comment.