Skip to content

Commit e23f006

Browse files
committed
Show loading text in search while searching
1 parent 013caec commit e23f006

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

data-browser/src/routes/SearchRoute.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ export function Search(): JSX.Element {
6565
{error && <ErrorLook>{error.message}</ErrorLook>}
6666
{query.length !== 0 ? (
6767
<>
68-
{results.length == 0 && <p>No Results found for {query}.</p>}
68+
{results.length == 0 && loading ? (
69+
<p>Loading...</p>
70+
) : (
71+
<p>No Results found for {query}.</p>
72+
)}
6973
{results.map((subject, index) => (
7074
<ResourceCard
7175
initialInView={index < 5}

0 commit comments

Comments
 (0)