From aedc0206464104f8e6a00f94df22c276b87688b4 Mon Sep 17 00:00:00 2001 From: eddie <66155195+just-toby@users.noreply.github.com> Date: Fri, 16 Dec 2022 11:07:42 -0500 Subject: [PATCH] fix: use render function for SearchBar placeholder translation (#5710) * fix: use render function for SearchBar placeholder translation * fix: use render function for SearchBar placeholder translation * fix: correct clsx usage --- src/components/NavBar/SearchBar.tsx | 37 ++++++++++++++++------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/src/components/NavBar/SearchBar.tsx b/src/components/NavBar/SearchBar.tsx index 6c4e0ad309..6d88d36a0d 100644 --- a/src/components/NavBar/SearchBar.tsx +++ b/src/components/NavBar/SearchBar.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line no-restricted-imports -import { t } from '@lingui/macro' +import { t, Trans } from '@lingui/macro' import { sendAnalyticsEvent, Trace, TraceEvent, useTrace } from '@uniswap/analytics' import { BrowserEvent, ElementName, EventName, SectionName } from '@uniswap/analytics-events' import clsx from 'clsx' @@ -156,9 +156,9 @@ export const SearchBar = () => { > { element={ElementName.NAVBAR_SEARCH_INPUT} properties={{ ...trace }} > - ) => { - !isOpen && toggleOpen() - setSearchValue(event.target.value) - }} - onBlur={() => sendAnalyticsEvent(EventName.NAVBAR_SEARCH_EXITED, navbarSearchEventProperties)} - className={`${styles.searchBarInput} ${styles.searchContentLeftAlign}`} - value={searchValue} - ref={inputRef} - width="full" + ( + ) => { + !isOpen && toggleOpen() + setSearchValue(event.target.value) + }} + onBlur={() => sendAnalyticsEvent(EventName.NAVBAR_SEARCH_EXITED, navbarSearchEventProperties)} + className={`${styles.searchBarInput} ${styles.searchContentLeftAlign}`} + value={searchValue} + ref={inputRef} + width="full" + /> + )} /> {!isOpen && /}