diff --git a/src/App.js b/src/App.js index 00d595b..e896153 100644 --- a/src/App.js +++ b/src/App.js @@ -16,16 +16,27 @@ import Filters from './components/Filters'; import styles from './styles/main.module.scss'; import '@blueprintjs/core/lib/css/blueprint.css'; -import CoachDaveSponsor from "./components/CoachDaveSponsor"; +import CoachDaveSponsor from './components/CoachDaveSponsor'; + +import './styles/fonts.css'; export default function App(): React.Node { - const { t } = useTranslation(); + const { t, i18n } = useTranslation(); const dispatch = useDispatch(); React.useEffect(() => { dispatch(startListener()); + + return () => {}; }, []); + React.useEffect(() => { + document.body.dir = i18n.dir(); + document.documentElement.setAttribute('lang', i18n.language); + + return () => {}; + }, [i18n.language]); + return (
diff --git a/src/index.html b/src/index.html index 3aa75c9..a58cba5 100644 --- a/src/index.html +++ b/src/index.html @@ -21,7 +21,8 @@ - + +
diff --git a/src/styles/fonts.css b/src/styles/fonts.css new file mode 100644 index 0000000..218366e --- /dev/null +++ b/src/styles/fonts.css @@ -0,0 +1,15 @@ +html body, +html input::placeholder, +html button, +html input { + font-family: 'Noto Sans', sans-serif; +} + + +html[lang="ja"] body, +html[lang="ja"] input::placeholder, +html[lang="ja"] button, +html[lang="ja"] input { + font-family: 'Noto Sans JP', sans-serif; +} +