-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat_upload_documents
- Loading branch information
Showing
41 changed files
with
2,123 additions
and
824 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,13 @@ | ||
import React, { useEffect } from 'react'; | ||
import React from 'react'; | ||
import { I18nextProvider } from 'react-i18next'; | ||
import i18n from './i18n'; | ||
import { mathJaxConfig } from './helpers/utils'; | ||
|
||
export interface Props { | ||
children: React.ReactNode; | ||
} | ||
|
||
const I18nWrapper = ({ children }: Props) => { | ||
useEffect(() => { | ||
// @ts-ignore | ||
if (!window.MathJax) window.MathJax = mathJaxConfig; | ||
}, []); | ||
|
||
return ( | ||
<I18nextProvider i18n={i18n}> | ||
{children} | ||
|
||
<script | ||
id="MathJax-script" | ||
async | ||
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" | ||
></script> | ||
</I18nextProvider> | ||
); | ||
return <I18nextProvider i18n={i18n}>{children}</I18nextProvider>; | ||
}; | ||
|
||
export default I18nWrapper; |
Oops, something went wrong.