Skip to content

Commit

Permalink
chore: fix search value
Browse files Browse the repository at this point in the history
  • Loading branch information
seaerchin committed Nov 15, 2024
1 parent 2da8e5c commit 537b70d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/studio/src/components/Searchbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const SearchModal = ({ siteId, isOpen, onClose }: SearchModalProps) => {
>
<OgpSearchBar
defaultIsExpanded
onSearch={setSearchValue}
onSearch={(value) => setSearchValue(value)}
w="42.5rem"
border={0}
placeholder={`Search pages, collections, or folders by name. e.g. "Speech by Minister"`}
Expand All @@ -174,6 +174,7 @@ const SearchModal = ({ siteId, isOpen, onClose }: SearchModalProps) => {
{searchValue && isLoading && "Searching your websites high and low"}
{!searchValue && "Recently edited on your site"}
{data &&
searchValue &&
!isLoading &&

Check failure on line 178 in apps/studio/src/components/Searchbar.tsx

View workflow job for this annotation

GitHub Actions / lint

Unnecessary conditional, value is always truthy

Check failure on line 178 in apps/studio/src/components/Searchbar.tsx

View workflow job for this annotation

GitHub Actions / lint

Unnecessary conditional, value is always truthy
`${getTotalCount(data.pages)} results found with ${searchValue} in title.`}
</Text>
Expand Down

0 comments on commit 537b70d

Please sign in to comment.