diff options
| author | jackyzha0 <[email protected]> | 2021-04-11 13:50:20 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2021-04-11 13:50:20 -0700 |
| commit | d58c7a3ad5dc83a08e040a855f158f8c6c09e154 (patch) | |
| tree | ec2f295f0816858915702c1f4e67973c2e4976fa /frontend/src/components | |
| parent | refactor error handling in pasteinfo (diff) | |
| download | ctrl-v-d58c7a3ad5dc83a08e040a855f158f8c6c09e154.tar.xz ctrl-v-d58c7a3ad5dc83a08e040a855f158f8c6c09e154.zip | |
password resolution, dynamic head
Diffstat (limited to 'frontend/src/components')
| -rw-r--r-- | frontend/src/components/NextHead.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/frontend/src/components/NextHead.js b/frontend/src/components/NextHead.js new file mode 100644 index 0000000..1019f61 --- /dev/null +++ b/frontend/src/components/NextHead.js @@ -0,0 +1,16 @@ +import Head from 'next/head' + +const NextHead = ({data}) => { + const title = data.title || "untitled paste" + const description = `${data.content.slice(0, 100)}... expires: ${data.expiry}` + return (<Head> + <title>ctrl-v | {title}</title> + <meta property="og:title" content={title} /> + <meta property="og:description" content={description} /> + <meta name="twitter:title" content={title} /> + <meta name="twitter:description" content={description} /> + <meta name="description" content={description} /> + </Head>) +} + +export default NextHead
\ No newline at end of file |