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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user