diff --git a/src/components/IntlLink.js b/src/components/IntlLink.js index 34bc1490a..ce225a060 100644 --- a/src/components/IntlLink.js +++ b/src/components/IntlLink.js @@ -6,7 +6,11 @@ import { useIntl } from 'react-intl' const IntlLink = ({ to, children, type, ...rest }) => { const intl = useIntl() - const localeTo = `${intl.locale === 'en' ? '' : '/' + intl.locale}${to}` + const localeTo = `${ + (intl.locale === 'ja' && to === '/appdev/dev') || intl.locale === 'zh' + ? '/' + intl.locale + : '' + }${to}` const linkType = type return ( diff --git a/src/components/footer.js b/src/components/footer.js index c5564d0df..e0cff8b27 100644 --- a/src/components/footer.js +++ b/src/components/footer.js @@ -5,7 +5,11 @@ import AddIcon from '@material-ui/icons/Add' import LanguageIcon from '@material-ui/icons/Language' import Socials from './socials' import IntlLink from '../components/IntlLink' -import { footerColumnsZh, footerColumnsEn } from '../data/footer' +import { + footerColumnsZh, + footerColumnsEn, + footerColumnsJa, +} from '../data/footer' import { useLocation } from '@reach/router' import { useSelector } from 'react-redux' import { FormattedMessage } from 'react-intl' @@ -15,7 +19,14 @@ const Footer = React.memo((prop) => { const switchableLangs = prop.switchableLangs const location = useLocation() const currentPathname = location.pathname - const footerColumns = locale === 'zh' ? footerColumnsZh : footerColumnsEn + const footerColumns = + locale === 'en' + ? footerColumnsEn + : locale === 'zh' + ? footerColumnsZh + : footerColumnsJa + + console.log('footerColumns: ', footerColumns) const { FooterLogoSVG } = useStaticQuery( graphql` diff --git a/src/components/navbar.js b/src/components/navbar.js index 11a259355..359195aeb 100644 --- a/src/components/navbar.js +++ b/src/components/navbar.js @@ -107,7 +107,7 @@ const Navbar = (prop) => { { > - {locale === 'en' && ( + {locale !== 'zh' && (