CoastalCommitsPastes/client/app/components/page-seo/index.tsx

25 lines
477 B
TypeScript
Raw Normal View History

2022-04-09 20:48:19 -04:00
import React from "react"
2022-03-12 23:13:35 -05:00
type PageSeoProps = {
2022-04-09 20:48:19 -04:00
title?: string
description?: string
2022-04-09 20:48:19 -04:00
isLoading?: boolean
isPrivate?: boolean
}
2022-03-12 23:13:35 -05:00
const PageSeo = ({
2022-04-09 20:48:19 -04:00
title = "Drift",
description = "A self-hostable clone of GitHub Gist",
isPrivate = false
2022-03-12 23:13:35 -05:00
}: PageSeoProps) => {
2022-04-09 20:48:19 -04:00
return (
<>
2022-11-09 21:38:05 -05:00
<title>Drift - {title}</title>
{!isPrivate && <meta name="description" content={description} />}
2022-11-10 02:11:36 -05:00
{isPrivate && <meta name="robots" content="noindex" />}
2022-04-09 20:48:19 -04:00
</>
)
}
2022-03-12 23:13:35 -05:00
2022-04-09 20:48:19 -04:00
export default PageSeo