added localization to search button
This commit is contained in:
parent
e64f26e927
commit
51dbf855c2
1 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import { useContext } from "react"
|
||||||
import { Link } from "react-router-dom"
|
import { Link } from "react-router-dom"
|
||||||
import ReactTooltip from "react-tooltip"
|
import ReactTooltip from "react-tooltip"
|
||||||
|
|
||||||
|
@ -6,7 +7,11 @@ import { faSearch } from "@fortawesome/free-solid-svg-icons"
|
||||||
|
|
||||||
import { StyledLink } from "./Navbar"
|
import { StyledLink } from "./Navbar"
|
||||||
|
|
||||||
|
import { globalContext } from "../../globalContext"
|
||||||
|
|
||||||
const SearchButton = () => {
|
const SearchButton = () => {
|
||||||
|
const { globalState } = useContext(globalContext)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
|
@ -21,7 +26,7 @@ const SearchButton = () => {
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<ReactTooltip id="search" type="dark" effect="solid">
|
<ReactTooltip id="search" type="dark" effect="solid">
|
||||||
<span>Search</span>
|
<span>{globalState.locale == "en" ? "Search" : "검색"}</span>
|
||||||
</ReactTooltip>
|
</ReactTooltip>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue