keroosha.cybergulag.today/quartz/components/ArticleTitle.tsx

12 lines
326 B
TypeScript
Raw Normal View History

2023-06-10 09:06:02 +03:00
import { QuartzComponentProps } from "./types"
export default function ArticleTitle({ fileData }: QuartzComponentProps) {
const title = fileData.frontmatter?.title
const displayTitle = fileData.slug === "index" ? undefined : title
if (displayTitle) {
return <h1>{displayTitle}</h1>
} else {
return null
}
}