diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-03-01 22:05:08 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-03-01 22:05:08 +0100 |
| commit | 8bd9784acdee6871ad70e86d0d7120299bf76969 (patch) | |
| tree | 9b81e0cd3ff881b2cbeb81f9f96b52b510d67646 /src/components/MetaItems/Author/Author.tsx | |
| parent | 21c228600a7a69cfea3b7d8af6838bcfda1d7399 (diff) | |
refactor: split posts meta into smaller components
Diffstat (limited to 'src/components/MetaItems/Author/Author.tsx')
| -rw-r--r-- | src/components/MetaItems/Author/Author.tsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/components/MetaItems/Author/Author.tsx b/src/components/MetaItems/Author/Author.tsx new file mode 100644 index 0000000..c3d78c2 --- /dev/null +++ b/src/components/MetaItems/Author/Author.tsx @@ -0,0 +1,20 @@ +import { MetaKind } from '@ts/types/app'; +import { useIntl } from 'react-intl'; +import { MetaItem } from '..'; + +const Author = ({ name, kind }: { name: string; kind: MetaKind }) => { + const intl = useIntl(); + + return ( + <MetaItem + title={intl.formatMessage({ + defaultMessage: 'Written by:', + description: 'Author: article author meta label', + })} + value={name} + kind={kind} + /> + ); +}; + +export default Author; |
