refactor: remove localization

Why:
- I was doing half-ass job at it in the first place (code-wise)
- maintaining sites for more than one locale proved to be more difficult
  than initially anticipated
- having more than one local does not add much value
- overall not worth it
This commit is contained in:
Kim, Jimin 2023-06-17 19:18:46 +09:00
parent e26738ee07
commit 4404518359
30 changed files with 99 additions and 691 deletions

View file

@ -1,11 +1,9 @@
import { useContext } from "react"
import styled from "styled-components"
import { Link } from "react-router-dom"
import HeaderButton from "./HeaderButton"
import NavbarData from "../../data/NavbarData"
import { globalContext } from "../../globalContext"
const Nav = styled.div`
display: flex;
@ -18,15 +16,11 @@ const Nav = styled.div`
`
export default () => {
const { globalState } = useContext(globalContext)
return (
<Nav>
{NavbarData.map((item, index) => (
<Link key={index} to={globalState.locale + item.path}>
<HeaderButton>
{globalState.locale == "en" ? item.title_en : item.title_kr}
</HeaderButton>
<Link key={index} to={item.path}>
<HeaderButton>{item.title}</HeaderButton>
</Link>
))}
</Nav>