diff --git a/src/components/Navbar/Navbar.tsx b/src/components/Navbar/Navbar.tsx index 955695d..d10f072 100644 --- a/src/components/Navbar/Navbar.tsx +++ b/src/components/Navbar/Navbar.tsx @@ -1,3 +1,4 @@ +import { useContext } from "react" import styled from "styled-components" import { Link } from "react-router-dom" @@ -10,6 +11,8 @@ import Sidebar from "../Sidebar" import theming from "../../styles/theming" +import { globalContext } from "../../globalContext" + const StyledNav = styled.nav` /* set z index to arbitrarily high value to prevent other components from drawing over the navbar */ z-index: 9999; @@ -60,12 +63,15 @@ export const StyledLink = styled.div` ` const Navbar = () => { + const { globalState } = useContext(globalContext) + const { locale } = globalState + return ( {/* icon */} - - + + {/* nav links */} diff --git a/src/components/Navbar/SearchButton.tsx b/src/components/Navbar/SearchButton.tsx index 4e254bd..5da8d31 100644 --- a/src/components/Navbar/SearchButton.tsx +++ b/src/components/Navbar/SearchButton.tsx @@ -11,22 +11,19 @@ import { globalContext } from "../../globalContext" const SearchButton = () => { const { globalState } = useContext(globalContext) + const { locale } = globalState return ( <>
- +
- {globalState.locale == "en" ? "Search" : "검색"} + {locale == "en" ? "Search" : "검색"} )