Skip to content

Commit

Permalink
feat(search): Remove search empty state
Browse files Browse the repository at this point in the history
  • Loading branch information
Baccega committed Apr 10, 2024
1 parent dc1805d commit 6283067
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
14 changes: 0 additions & 14 deletions components/Common/Search/States/WithEmptyState.tsx

This file was deleted.

9 changes: 2 additions & 7 deletions components/Common/Search/States/WithSearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type { FC } from 'react';

import styles from '@/components/Common/Search/States/index.module.css';
import { WithAllResults } from '@/components/Common/Search/States/WithAllResults';
import { WithEmptyState } from '@/components/Common/Search/States/WithEmptyState';
import { WithError } from '@/components/Common/Search/States/WithError';
import { WithNoResults } from '@/components/Common/Search/States/WithNoResults';
import { WithPoweredBy } from '@/components/Common/Search/States/WithPoweredBy';
Expand Down Expand Up @@ -184,9 +183,7 @@ export const WithSearchBox: FC<SearchBoxProps> = ({ onClose }) => {
}
aria-autocomplete="list"
aria-controls="fulltext-results-container"
aria-expanded={Boolean(
!searchError && searchTerm && searchResults?.count
)}
aria-expanded={Boolean(!searchError && searchResults?.count)}
autoComplete="off"
role="combobox"
type="search"
Expand Down Expand Up @@ -219,9 +216,7 @@ export const WithSearchBox: FC<SearchBoxProps> = ({ onClose }) => {
>
{searchError && <WithError />}

{!searchError && !searchTerm && <WithEmptyState />}

{!searchError && searchTerm && (
{!searchError && (
<>
{searchResults &&
searchResults.count > 0 &&
Expand Down

0 comments on commit 6283067

Please sign in to comment.