Skip to content

Commit

Permalink
study
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed Nelson committed Aug 8, 2023
1 parent 501e334 commit 038ec24
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
Binary file removed public/images/no-search-found.png
Binary file not shown.
24 changes: 9 additions & 15 deletions src/layouts/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,9 @@ const Search = ({ searchList }: Props) => {
</div>
</div>
</div>

{/* {inputVal.length > 1 && (
<div className="mt-8">
Found {searchResults?.length}
{searchResults?.length && searchResults?.length === 1
? " result"
: " results"}{" "}
for '{inputVal}'
</div>
)} */}
<div className="row">
{searchResults?.length < 1 ? (
<div className="mx-auto pt-5 text-center">
<img
className="mx-auto mb-6"
src="/images/no-search-found.png"
alt="no-search-found"
/>
<h1 className="h2 mb-4">
{inputVal.length < 1 ? "Search Post Here" : "No Search Found!"}
</h1>
Expand Down Expand Up @@ -171,6 +156,15 @@ const Search = ({ searchList }: Props) => {
))
)}
</div>
{/* {inputVal.length > 1 && (
<div className="mt-4 mx-auto text-center">
Found {searchResults?.length}
{searchResults?.length && searchResults?.length === 1
? " result"
: " results"}{" "}
for '{inputVal}'
</div>
)} */}
</div>
</section>
);
Expand Down
4 changes: 4 additions & 0 deletions src/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ strong {
code {
@apply after:border-none;
}

img {
@apply mx-auto;
}

0 comments on commit 038ec24

Please sign in to comment.