mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-28 07:22:41 +03:00
fix: html tag should have correct lang attr (#884)
This commit is contained in:
parent
02aea468ca
commit
7bd69809e9
@ -21,6 +21,8 @@ import { useAppState } from '@/providers/app-state-provider';
|
||||
import { PageLoading } from '@/components/loading';
|
||||
import Head from 'next/head';
|
||||
import '@affine/i18n';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import React from 'react';
|
||||
|
||||
const ThemeProvider = dynamic(() => import('@/providers/ThemeProvider'), {
|
||||
ssr: false,
|
||||
@ -39,6 +41,11 @@ type AppPropsWithLayout = AppProps & {
|
||||
|
||||
const App = ({ Component, pageProps }: AppPropsWithLayout) => {
|
||||
const getLayout = Component.getLayout || (page => page);
|
||||
const { i18n } = useTranslation();
|
||||
|
||||
React.useEffect(() => {
|
||||
document.documentElement.lang = i18n.language;
|
||||
}, [i18n.language]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
Loading…
Reference in New Issue
Block a user