Skip to content

Commit bbf74aa

Browse files
committed
fix(code-block): remove unused theme variable and fix whitespace
1 parent b9ee6f9 commit bbf74aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/ui/code-block.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function CodeBlock({
4646
maxVisibleLines = 10,
4747
defaultExpanded = false,
4848
}: CodeBlockProps) {
49-
const { theme: applicationTheme, resolvedTheme } = useTheme();
49+
const { resolvedTheme } = useTheme();
5050
const [copied, setCopied] = React.useState(false);
5151
const [localActiveTab, setLocalActiveTab] = React.useState<string | undefined>(activeTab || (tabs && tabs.length > 0 ? tabs[0].value : undefined));
5252
const [isExpanded, setIsExpanded] = React.useState(defaultExpanded);
@@ -85,7 +85,7 @@ export function CodeBlock({
8585

8686
const codeLines = activeContent.split("\n");
8787
const shouldCollapse = collapsible && codeLines.length > maxVisibleLines;
88-
const displayedCode = shouldCollapse && !isExpanded
88+
const displayedCode = shouldCollapse && !isExpanded
8989
? codeLines.slice(0, maxVisibleLines).join("\n")
9090
: activeContent;
9191

@@ -364,7 +364,7 @@ export function CodeBlock({
364364
</pre>
365365
)}
366366
</Highlight>
367-
367+
368368
{shouldCollapse && !isExpanded && (
369369
<div className="absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-background to-transparent pointer-events-none" />
370370
)}

0 commit comments

Comments
 (0)