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

25 lines
477 B
TypeScript
Raw Normal View History

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