diff --git a/src/components/ContentBlock/ContentBlock.Header.tsx b/src/components/ContentBlock/ContentBlock.Header.tsx index ccff3c4..95b98bb 100644 --- a/src/components/ContentBlock/ContentBlock.Header.tsx +++ b/src/components/ContentBlock/ContentBlock.Header.tsx @@ -1,9 +1,13 @@ import styled from '@emotion/styled' import { Typography } from '@acid-info/lsd-react' -import { PostClassType } from '../Post/Post' + +export enum BlockType { + TEXT = 'text', + IMAGE = 'image', +} type Props = { - type: PostClassType + type: BlockType date: string } @@ -11,7 +15,7 @@ const ContentBlockHeader = ({ type, date }: Props) => { return ( - {type.toUpperCase()} + {type === BlockType.TEXT ? 'PARAGRAPH' : 'IMAGE'} diff --git a/src/components/ContentBlock/ImageBlock.tsx b/src/components/ContentBlock/ImageBlock.tsx index 8ab38be..847bd45 100644 --- a/src/components/ContentBlock/ImageBlock.tsx +++ b/src/components/ContentBlock/ImageBlock.tsx @@ -6,7 +6,7 @@ import { UnbodyImageBlock } from '@/lib/unbody/unbody.types' import { GridItem } from '../Grid/Grid' import { PostClassType } from '../Post/Post' -import ContentBlockHeader from './ContentBlock.Header' +import ContentBlockHeader, { BlockType } from './ContentBlock.Header' import ContentBlockBody from './ContentBlock.Body' import { ResponsiveImage } from '../ResponsiveImage/ResponsiveImage' @@ -20,7 +20,7 @@ const ImageBlock = ({ doc }: Props) => { , 'score'> @@ -18,7 +18,7 @@ const TextBlock = ({ doc }: Props) => {