({ children })
| 15 | import styles from './layouts.module.css'; |
| 16 | |
| 17 | const PostLayout: FC<PropsWithChildren> = ({ children }) => { |
| 18 | const { frontmatter } = getClientContext(); |
| 19 | |
| 20 | const authors = mapAuthorToCardAuthors(frontmatter.author!); |
| 21 | |
| 22 | const type = mapBlogCategoryToPreviewType(frontmatter.category!); |
| 23 | |
| 24 | return ( |
| 25 | <> |
| 26 | <WithNavBar /> |
| 27 | |
| 28 | <div className={styles.contentLayout}> |
| 29 | <div></div> |
| 30 | |
| 31 | <div className={styles.postLayout}> |
| 32 | <main id="main" tabIndex={-1}> |
| 33 | {type === 'vulnerability' && <EOLAlert />} |
| 34 | |
| 35 | <h1>{frontmatter.title}</h1> |
| 36 | |
| 37 | <section> |
| 38 | <WithAvatarGroup names={authors} size="medium" /> |
| 39 | |
| 40 | <p>{authors.join(', ')}</p> |
| 41 | </section> |
| 42 | |
| 43 | <Preview title={frontmatter.title!} type={type} /> |
| 44 | |
| 45 | {children} |
| 46 | |
| 47 | <WithBlogCrossLinks /> |
| 48 | </main> |
| 49 | </div> |
| 50 | |
| 51 | <WithMetaBar /> |
| 52 | </div> |
| 53 | |
| 54 | <WithFooter /> |
| 55 | </> |
| 56 | ); |
| 57 | }; |
| 58 | |
| 59 | export default PostLayout; |
nothing calls this directly
no test coverage detected