1
0
mirror of https://github.com/uetchy/namae.git synced 2025-10-14 23:22:19 +09:00

feat: switch app store region based on lang

This commit is contained in:
2019-08-07 13:38:27 +09:00
parent 5d17a86779
commit f3c01ac77f
4 changed files with 9 additions and 4 deletions

View File

@@ -18,5 +18,6 @@
"s3": "AWS S3",
"jsorg": "js.org"
},
"countryCode": "us",
"try": "How about"
}

View File

@@ -18,5 +18,6 @@
"s3": "AWS S3",
"jsorg": "js.org"
},
"countryCode": "jp",
"try": "これはどう?"
}

View File

@@ -6,8 +6,11 @@ import { FaAppStore } from 'react-icons/fa'
import { Card, Result } from '../Cards'
function Search({ query }) {
const { t } = useTranslation()
const term = encodeURIComponent(query)
const response = useFetch(`/availability/appstore/${term}`)
const response = useFetch(
`/availability/appstore/${term}?country=${t('countryCode')}`
)
const apps = response.result
return (