그다음에는 PostViewer 컴포넌트에서 Helmet을 사용하여 포스트의 제목이 페이지의 제목이 되도록 설정해 보세요.
components/post/PostViewer.js
import React from 'react'; import styled from 'styled-components'; import palette from '../../lib/styles/palette'; import Responsive from '../common/Responsive'; import SubInfo from '../common/SubInfo'; import Tags from '../common/Tags'; import { Helmet } from 'react-helmet-async'; (...) const PostViewer = ({ post, error, loading, actionButtons }) => { (...) return ( <PostViewerBlock> <Helmet> <title>{title} - REACTERS</title> </Helmet> <PostHead> <h1>{title}</h1> <SubInfo username={user.username} publishedDate={publishedDate} hasMarginTop /> <Tags tags={tags} /> </PostHead> {actionButtons} <PostContent dangerouslySetInnerHTML={{ _ _html: body }} /> </PostViewerBlock> ); }; export default PostViewer;