Skip to content

Commit

Permalink
fix bugs introduced by #232 on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
maltejur committed Oct 22, 2023
1 parent 1d72fe6 commit 059a8dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/searchBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function SearchBar({
if (event) event.preventDefault();

// When input value is null, set error & empty state to `true` and do nothing.
if (!query || !inputRef.current.value) {
if (!inputRef.current.value) {
setIsError(true);
setIsEmpty(true);
return;
Expand All @@ -81,7 +81,7 @@ export default function SearchBar({
style={{ marginRight: -12 }}
onClick={() => handleSubmit()}
aria-label="Search"
disabled={isEmpty}
disabled={!smallScreen && isEmpty}
>
<Search />
</IconButton>
Expand Down

1 comment on commit 059a8dd

@vercel
Copy link

@vercel vercel bot commented on 059a8dd Oct 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

website – ./

website-git-main-thealgorithms.vercel.app
website-thealgorithms.vercel.app
the-algorithms.com

Please sign in to comment.