aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2024-06-07 21:24:06 -0700
committerGravatar Anshul Gupta <ansg191@anshulg.com> 2024-06-07 21:24:06 -0700
commit860a19cfb2ae33373e7c2b907c875ea8086ca08c (patch)
tree69b31ca97627d7af6e40c685110b695e8e2a2b86
parent047d9046397eec9c72b7cfccfcf0ac265b64f636 (diff)
downloadCS172-Project-860a19cfb2ae33373e7c2b907c875ea8086ca08c.tar.gz
CS172-Project-860a19cfb2ae33373e7c2b907c875ea8086ca08c.tar.zst
CS172-Project-860a19cfb2ae33373e7c2b907c875ea8086ca08c.zip
Add no results display
-rw-r--r--web/src/App.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/src/App.tsx b/web/src/App.tsx
index ffbf101..e2cd151 100644
--- a/web/src/App.tsx
+++ b/web/src/App.tsx
@@ -39,6 +39,11 @@ function App() {
<div className="item-container">
{data.map((doc: ResultDoc) => <Doc document={doc} key={doc.id}/>)}
+ {data.length == 0 && query.length > 0 &&
+ <div className="card">
+ <p>No Results Found</p>
+ </div>
+ }
</div>
</>
)