Skip to content

Commit

Permalink
[#75] fix: add localization to titles of cities
Browse files Browse the repository at this point in the history
  • Loading branch information
damla committed Feb 25, 2021
1 parent 70b9400 commit a136c70
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pages/contact/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface Props {
common: CommonModel
page: ContactModel
Base64Values: string[]
locale: string
}

export const getStaticProps: GetStaticProps = async ({ locale = 'tr' }) => {
Expand All @@ -31,7 +32,8 @@ export const getStaticProps: GetStaticProps = async ({ locale = 'tr' }) => {
props: {
common: commonData,
page: pageData,
Base64Values: base64Values
Base64Values: base64Values,
locale: locale
}
}
}
Expand All @@ -43,6 +45,7 @@ export default function Contact ({
subtitle,
informations
},
locale,
Base64Values
}: Props
): ReactElement {
Expand All @@ -68,7 +71,7 @@ export default function Contact ({
{
informations.map((element, index) => (
<div key={index} className={styles.item}>
<h3 className={styles.boxTitle}>{element.city}</h3>
<h3 lang={locale} className={styles.boxTitle}>{element.city}</h3>
<div className={styles.boxSubtitle}>
<Image
src="/assets/svgs/map-pin-primary.svg"
Expand Down

0 comments on commit a136c70

Please sign in to comment.