1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 05:01:16 -04:00

remove unnecessary react fragments

This commit is contained in:
2022-01-18 09:54:30 -05:00
parent a406010bd2
commit 5e9503b562
22 changed files with 142 additions and 125 deletions

View File

@@ -12,12 +12,10 @@ const CodeBlock = (props: Props) => {
if (props.className?.split(" ").includes("code-highlight")) {
// full multi-line code blocks with prism highlighting and copy-to-clipboard button
return (
<>
<div className={styles.code}>
<CopyButton source={props.children} />
<code {...props}>{props.children}</code>
</div>
</>
<div className={styles.code}>
<CopyButton source={props.children} />
<code {...props}>{props.children}</code>
</div>
);
} else {
// inline code in paragraphs, headings, etc. (not highlighted)