mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-26 14:59:14 +01:00
Fix linting errors.
This commit is contained in:
parent
fabb799f93
commit
c94d7409c8
@ -13,7 +13,12 @@ type Props = {
|
||||
socialImage? :string
|
||||
};
|
||||
|
||||
const Layout = ({ children, title, description, socialImage }: Props) => {
|
||||
const Layout = ({
|
||||
children,
|
||||
title,
|
||||
description,
|
||||
socialImage
|
||||
}: Props) => {
|
||||
const { author, url } = useSiteMetadata();
|
||||
const metaImage = socialImage != null ? socialImage : author.photo;
|
||||
const metaImageUrl = url + withPrefix(metaImage);
|
||||
@ -32,7 +37,7 @@ const Layout = ({ children, title, description, socialImage }: Props) => {
|
||||
</Helmet>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
export default Layout;
|
||||
|
@ -16,7 +16,8 @@ type Props = {
|
||||
const PageTemplate = ({ data }: Props) => {
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
const { html: pageBody } = data.markdownRemark;
|
||||
const { title: pageTitle, description: pageDescription, socialImage } = data.markdownRemark.frontmatter;
|
||||
const frontmatter = data.markdownRemark.frontmatter;
|
||||
const { title: pageTitle, description: pageDescription, socialImage } = frontmatter;
|
||||
const metaDescription = pageDescription !== null ? pageDescription : siteSubtitle;
|
||||
|
||||
return (
|
||||
|
@ -14,7 +14,8 @@ type Props = {
|
||||
|
||||
const PostTemplate = ({ data }: Props) => {
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
const { title: postTitle, description: postDescription, socialImage } = data.markdownRemark.frontmatter;
|
||||
const frontmatter = data.markdownRemark.frontmatter;
|
||||
const { title: postTitle, description: postDescription, socialImage } = frontmatter;
|
||||
const metaDescription = postDescription !== null ? postDescription : siteSubtitle;
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user