X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fpages%2FAosGenerate.js;h=b787848f3a826f7420ee5adfec0b5e236c5dfecd;hb=9e08a6086d2c982ec9a2b9b79e3441ac8347f695;hp=0c27b06377cf38660bee402a632eaeaa4dd413f5;hpb=a5e53546a5960f54fb45e06767f89e9dfeef6a47;p=alttp.git
diff --git a/resources/js/components/pages/AosGenerate.js b/resources/js/components/pages/AosGenerate.js
index 0c27b06..b787848 100644
--- a/resources/js/components/pages/AosGenerate.js
+++ b/resources/js/components/pages/AosGenerate.js
@@ -1,17 +1,20 @@
import axios from 'axios';
import React, { useCallback, useEffect, useState } from 'react';
+import { Helmet } from 'react-helmet';
+import { useTranslation } from 'react-i18next';
import Generate from '../aos-generate/Generate';
import ErrorBoundary from '../common/ErrorBoundary';
import ErrorMessage from '../common/ErrorMessage';
import Loading from '../common/Loading';
-import i18n from '../../i18n';
const AosGenerate = () => {
const [error, setError] = useState(null);
const [loading, setLoading] = useState(true);
const [presets, setPresets] = useState([]);
+ const { t } = useTranslation();
+
const loadPresets = useCallback(ctrl => {
axios
.get('/api/aos-presets', { signal: ctrl.signal })
@@ -36,10 +39,6 @@ const AosGenerate = () => {
};
}, []);
- useEffect(() => {
- window.document.title = i18n.t('aosGenerate.heading');
- }, [i18n.language]);
-
if (loading) {
return ;
}
@@ -49,6 +48,9 @@ const AosGenerate = () => {
}
return
+
+ {t('aosGenerate.heading')}
+
;
};