diff --git a/src/components/Metadata/__snapshots__/test.js.snap b/src/components/Metadata/__snapshots__/test.js.snap
index 1f34460..46f561b 100644
--- a/src/components/Metadata/__snapshots__/test.js.snap
+++ b/src/components/Metadata/__snapshots__/test.js.snap
@@ -5,13 +5,15 @@ exports[`Metadata rendering 1`] = `
-
- Regexper
-
-
+ />
`;
@@ -20,16 +22,15 @@ exports[`Metadata rendering with a title and description 1`] = `
-
- Regexper - Testing
-
-
-
+ />
`;
diff --git a/src/components/Metadata/index.js b/src/components/Metadata/index.js
index 8ece14f..004ed92 100644
--- a/src/components/Metadata/index.js
+++ b/src/components/Metadata/index.js
@@ -5,14 +5,20 @@ import { Helmet } from 'react-helmet';
const Metadata = ({ title, description }) => {
const { i18n } = useTranslation();
- const htmlAttributes = {
- lang: i18n.language
+ const helmetProps = {
+ title: title ? `Regexper - ${ title }` : 'Regexper',
+ htmlAttributes: {
+ lang: i18n.language
+ },
+ meta: [
+ {
+ name: 'description',
+ content: description
+ }
+ ]
};
- return
- { title ? `Regexper - ${ title }` : 'Regexper' }
- { description && }
- ;
+ return ;
};
Metadata.propTypes = {