tracesSearchBar.tsx 656 B

12345678910111213141516171819202122
  1. import SearchBar from 'sentry/components/events/searchBar';
  2. import type {SmartSearchBarProps} from 'sentry/components/smartSearchBar';
  3. import {t} from 'sentry/locale';
  4. import useOrganization from 'sentry/utils/useOrganization';
  5. interface TracesSearchBarProps {
  6. handleSearch: SmartSearchBarProps['onSearch'];
  7. query: string;
  8. }
  9. export function TracesSearchBar({query, handleSearch}: TracesSearchBarProps) {
  10. // TODO: load tags for autocompletion
  11. const organization = useOrganization();
  12. return (
  13. <SearchBar
  14. query={query}
  15. onSearch={handleSearch}
  16. placeholder={t('Filter by tags')}
  17. organization={organization}
  18. />
  19. );
  20. }