mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-01-26 05:22:28 +01:00
Add Flow Typing for Post/Author.js
This commit is contained in:
parent
c11a2731a4
commit
744363e307
@ -1,9 +1,10 @@
|
|||||||
|
// @flow
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { graphql, StaticQuery } from 'gatsby';
|
import { graphql, StaticQuery } from 'gatsby';
|
||||||
import { getContactHref } from '../../../utils';
|
import { getContactHref } from '../../../utils';
|
||||||
import styles from './Author.module.scss';
|
import styles from './Author.module.scss';
|
||||||
|
|
||||||
export const PureAuthor = ({ data }) => {
|
export const PureAuthor = ({ data }: Object) => {
|
||||||
const { author } = data.site.siteMetadata;
|
const { author } = data.site.siteMetadata;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -23,7 +24,7 @@ export const PureAuthor = ({ data }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Author = (props) => (
|
export const Author = () => (
|
||||||
<StaticQuery
|
<StaticQuery
|
||||||
query={graphql`
|
query={graphql`
|
||||||
query AuthorQuery {
|
query AuthorQuery {
|
||||||
@ -32,7 +33,7 @@ export const Author = (props) => (
|
|||||||
author {
|
author {
|
||||||
name
|
name
|
||||||
bio
|
bio
|
||||||
contacts {
|
contacts {
|
||||||
twitter
|
twitter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,7 +41,7 @@ export const Author = (props) => (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
render={(data) => <PureAuthor {...props} data={data} />}
|
render={(data) => <PureAuthor data={data} />}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user