import axios from 'axios';
import React, { useEffect, useState } from 'react';
+import { Helmet } from 'react-helmet';
import { withTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
};
}, [name]);
- useEffect(() => {
- if (technique) {
- window.document.title = getTranslation(technique, 'title', i18n.language);
- }
- }, [technique, i18n.language]);
-
if (loading) {
return <Loading />;
}
}
return <ErrorBoundary>
+ <Helmet>
+ <title>{getTranslation(technique, 'title', i18n.language)}</title>
+ <meta name="description" content={getTranslation(technique, 'short', i18n.language)} />
+ </Helmet>
<Detail technique={technique} />
</ErrorBoundary>;
};