-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- title만 동적으로 바뀐다. 메타태그는 동적으로 바뀌지 않음을 볼 수 있다.
- Loading branch information
1 parent
38382d2
commit 0878117
Showing
7 changed files
with
4,494 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/build/*.js | ||
/config/*.js | ||
/bower_components/foo/*.js | ||
!.build | ||
.build/* | ||
!.build/test.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
|
||
# production | ||
/build | ||
.build | ||
|
||
# misc | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import { Helmet } from 'react-helmet-async'; | ||
import { useLocation } from 'react-router-dom'; | ||
import { convertAmount } from '../../utils/function/convertAmount'; | ||
|
||
const SEOMetaTag = () => { | ||
const { state } = useLocation(); | ||
if (state) | ||
return ( | ||
<Helmet> | ||
<title>{`${state.attribute.brand} ${state.attribute.name}`}</title> | ||
<meta property="og:type" content="website" /> | ||
<meta property="og:title" content={`${state.attribute.brand} ${state.attribute.name}`} /> | ||
<meta property="og:description" content={`월 ${convertAmount(state.amount)} 원`} /> | ||
<meta property="og:image" content={state.attribute.imageUrl} /> | ||
|
||
<link rel="canonical" href={state.url} /> | ||
</Helmet> | ||
); | ||
}; | ||
|
||
export default SEOMetaTag; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters