Skip to content

Commit

Permalink
refactor: conditionally render error p tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hetd54 committed Dec 4, 2023
1 parent 1c4ded7 commit afacd93
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export const SiteSearch: FunctionComponent<SearchProps> = ({
placeholder={"Type to search pages..."}
onChange={(e) => setSearchQuery(e.target.value)}
/>
<p className="px-4 text-red text-tag font-bold">{errorMessage}</p>
{errorMessage && (
<p className="px-4 text-red text-tag font-bold">{errorMessage}</p>
)}
<div className="pt-2">
Number of found pages:
{queryResults.length}
Expand Down

0 comments on commit afacd93

Please sign in to comment.