Skip to content

Commit

Permalink
add venue map translation
Browse files Browse the repository at this point in the history
  • Loading branch information
SStan-prog committed Nov 21, 2024
1 parent b86c24c commit 2364e3c
Show file tree
Hide file tree
Showing 3 changed files with 1,251 additions and 20 deletions.
12 changes: 10 additions & 2 deletions 2024/src/components/VenueMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styled from "styled-components"
import { useTranslation } from "react-i18next"

import venueMap from "../images/venue-map.svg"
import venueMapJa from "../images/venue-map-ja.svg"

type Props = {
width: number
Expand All @@ -25,11 +26,18 @@ const Img = styled.img`
`

export const VenueMap = ({ width, height }: Props) => {
const { t } = useTranslation()
const { t, i18n } = useTranslation()

console.log(i18n.language)

return (
<MapContainer>
<Img width={width} height={height} src={venueMap} alt={t("venue.map")} />
<Img
width={width}
height={height}
src={i18n.language === "ja" ? venueMapJa : venueMap}
alt={t("venue.map")}
/>
</MapContainer>
)
}
Expand Down
Loading

0 comments on commit 2364e3c

Please sign in to comment.