Skip to content

Commit 0385a3e

Browse files
fix(languages): use ternary for rendering of close button on input
1 parent 4706ad6 commit 0385a3e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pages/languages.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ const LanguagesPage = ({ location }: PageProps<Queries.LanguagesPageQuery>) => {
9797
value={keyword}
9898
placeholder={searchString}
9999
onChange={(e) => setKeyword(e.target.value)}
100-
rightElement={
101-
keyword !== "" && (
100+
rightIcon={
101+
keyword !== "" ? (
102102
<IconButton
103103
icon={<MdClose />}
104104
onClick={resetKeyword}
@@ -108,7 +108,7 @@ const LanguagesPage = ({ location }: PageProps<Queries.LanguagesPageQuery>) => {
108108
variant="icon"
109109
_hover={{ svg: { fill: "primary" } }}
110110
/>
111-
)
111+
) : undefined
112112
}
113113
/>
114114
</Box>

0 commit comments

Comments
 (0)