Skip to content

Commit

Permalink
empty state
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfcosta committed Nov 12, 2024
1 parent eba7ad2 commit d88d9ee
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions apps/web/src/components/schemaExplorer/SchemaList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,21 @@ export default function SchemaList(props: Props) {
/>
</div>
<ul className="h-full">
{sortedSchemas.map(([schemaName, schema]) => (
<SchemaItem
key={schemaName}
dataSource={props.dataSource}
schemaName={schemaName}
schema={schema}
search={search}
/>
))}
{sortedSchemas.length === 0 ? (
<li className="px-4 py-4 text-gray-500 text-xs">
No results found.
</li>
) : (
sortedSchemas.map(([schemaName, schema]) => (
<SchemaItem
key={schemaName}
dataSource={props.dataSource}
schemaName={schemaName}
schema={schema}
search={search}
/>
))
)}
</ul>
</div>
</div>
Expand Down

0 comments on commit d88d9ee

Please sign in to comment.