Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
sadnessOjisan committed Aug 9, 2023
1 parent 59afb79 commit 5e77435
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/components/common/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const HeadFactory: ComponentType<Props> = ({
shouldProtect,
}) => {
// 他の場所でも呼び出すなら custom hooks として切り出すべき
const siteMetaDataQueryResult: Queries.SiteMetaDataQuery =
useStaticQuery(graphql`
const siteMetaDataQueryResult: Queries.SiteMetaDataQuery = useStaticQuery(
graphql`
query SiteMetaData {
site {
siteMetadata {
Expand All @@ -36,7 +36,8 @@ export const HeadFactory: ComponentType<Props> = ({
}
}
}
`);
`,
);
const baseData = siteMetaDataQueryResult.site?.siteMetadata;
if (
!baseData?.title ||
Expand Down
7 changes: 3 additions & 4 deletions src/components/detail/contents-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import { Tags } from "../common/tags";
import * as styles from "./contents-header.module.css";

export const ContentsHeader: ComponentType<{
markdownMeta:
| NonNullable<
Queries.DetailPageQueryQuery["markdownRemark"]
>["frontmatter"];
markdownMeta: NonNullable<
Queries.DetailPageQueryQuery["markdownRemark"]
>["frontmatter"];
}> = ({ markdownMeta }) => {
if (
!markdownMeta ||
Expand Down
2 changes: 1 addition & 1 deletion src/templates/detail-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const Head = ({ data }: HeadProps<Queries.DetailPageQueryQuery>) => {
// getImage と違って null を引数に取れないので上で null チェックしている
// OGP 生成に使われてる関数: https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-plugin-image/#getsrc
const imageSrc = getSrc(
data.markdownRemark.frontmatter.visual.childImageSharp
data.markdownRemark.frontmatter.visual.childImageSharp,
);

if (!imageSrc) {
Expand Down

0 comments on commit 5e77435

Please sign in to comment.