Skip to content

Commit

Permalink
Merge pull request #515 from SStan-prog/scott-stanfel-patch-8
Browse files Browse the repository at this point in the history
add venue map translation
  • Loading branch information
martinheidegger authored Nov 21, 2024
2 parents b86c24c + 2364e3c commit fb13862
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 fb13862

Please sign in to comment.