Skip to content

Commit

Permalink
fix: post full width when no headings
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Oct 15, 2024
1 parent ffdd217 commit c08ff9a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/foundation/app/(Site)/blog/[slug]/BlogPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ export default async function BlogPost({ post }: PostProps) {
mobileImagePosition="below"
/>
<div className="mt-6 flex flex-row justify-center gap-12 md:mt-12">
<PortableText body={body} className="max-w-screen-md" wrapperComponent="section" />
<PortableText
body={body}
className={cn(headings.length && 'max-w-screen-md')}
wrapperComponent="section"
/>
{headings.length ? (
<HeadingOutline headings={headings} title={blogDictionary('inThisArticle')} />
) : null}
Expand Down

0 comments on commit c08ff9a

Please sign in to comment.