Skip to content

Commit

Permalink
Merge pull request #11 from Fi1osof/master
Browse files Browse the repository at this point in the history
Fix content blocks
  • Loading branch information
linklib committed Jul 26, 2021
2 parents 2d67879 + 5e1a493 commit 36175ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/Beers/Beer/index.tsx
Expand Up @@ -97,6 +97,11 @@ const BeerPage = () => {
break
}

const blocks =
beerinfo.content &&
!Array.isArray(beerinfo.content) &&
beerinfo.content?.blocks

return (
<>
<Paper style={{ padding: '15px' }}>
Expand Down Expand Up @@ -208,7 +213,7 @@ const BeerPage = () => {
<Paper style={{ padding: '15px', marginTop: '15px' }}>
<h2>Описание пива {beerinfo.name}</h2>

{beerinfo.content?.blocks.map(
{blocks?.map(
(
contentPart: { text: string | null | undefined },
index: React.Key | null | undefined
Expand Down

0 comments on commit 36175ad

Please sign in to comment.