Skip to content

Commit

Permalink
Whenever Some Search Or Filter Yields 0 Results, Display a Message Sa…
Browse files Browse the repository at this point in the history
…ying 'No Results Found'.
  • Loading branch information
PRINCEjain0 committed Jan 13, 2025
1 parent 4fe7488 commit 99a1018
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pages/tools/components/ToolingTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,24 @@ const ToolingTable = ({

const groups = Object.keys(toolsByGroup);

if (groups.length === 0 || (groups.length === 1 && groups[0] === 'none' && toolsByGroup['none'].length === 0)) {

Check failure on line 80 in pages/tools/components/ToolingTable.tsx

View workflow job for this annotation

GitHub Actions / Code Quality Checks

Replace `groups.length·===·0·||·(groups.length·===·1·&&·groups[0]·===·'none'·&&·toolsByGroup['none'].length·===·0)` with `⏎····groups.length·===·0·||⏎····(groups.length·===·1·&&⏎······groups[0]·===·'none'·&&⏎······toolsByGroup['none'].length·===·0)⏎··`
return (
<section className='mb-12 text-left'>
<div className='overflow-x-auto'>
<table className='min-w-full bg-slate-800 border border-gray-200'>
<tbody>
<tr>
<td className='px-6 py-16 text-center text-slate-300 text-lg'>
No results found
</td>
</tr>
</tbody>
</table>
</div>
</section>
);
}

const openModal = (tool: JSONSchemaTool) => {
setSelectedTool(tool);
postAnalytics({
Expand Down

0 comments on commit 99a1018

Please sign in to comment.