Skip to content

Commit 66f935b

Browse files
committed
used react-helmet on dynamic pages
1 parent 211a406 commit 66f935b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

web/src/apps/main/pages/articles/content/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import LinkedInIcon from "@material-ui/icons/LinkedIn";
1414
import TwitterIcon from "@material-ui/icons/Twitter";
1515
import Skeleton from "@material-ui/lab/Skeleton";
1616
import { FC, useEffect } from "react";
17+
import { Helmet } from "react-helmet";
1718
import { useDispatch, useSelector } from "react-redux";
1819
import { Authors } from "src/apps/main/components/authors";
1920
import { Contributors } from "src/apps/main/components/contributors";
@@ -104,6 +105,10 @@ export const Content: FC = () => {
104105
/>
105106
) : currentArticle ? (
106107
<>
108+
<Helmet>
109+
<title>{`${currentArticle.title} | DzCode i/o`}</title>
110+
<meta name="description" content={currentArticle.description} />
111+
</Helmet>
107112
{/* Image */}
108113
{currentArticle.image && (
109114
<img

web/src/apps/main/pages/learn/content/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import LinkedInIcon from "@material-ui/icons/LinkedIn";
1414
import TwitterIcon from "@material-ui/icons/Twitter";
1515
import Skeleton from "@material-ui/lab/Skeleton";
1616
import { FC, useEffect } from "react";
17+
import { Helmet } from "react-helmet";
1718
import { useDispatch, useSelector } from "react-redux";
1819
import { Authors } from "src/apps/main/components/authors";
1920
import { Contributors } from "src/apps/main/components/contributors";
@@ -103,6 +104,10 @@ export const Content: FC = () => {
103104
/>
104105
) : currentDocument ? (
105106
<>
107+
<Helmet>
108+
<title>{`${currentDocument.title} | DzCode i/o`}</title>
109+
<meta name="description" content={currentDocument.description} />
110+
</Helmet>
106111
{/* Image */}
107112
{currentDocument.image && (
108113
<img

0 commit comments

Comments
 (0)