Skip to content

Commit 041dc6e

Browse files
authored
Merge pull request #426 from ProBuidler/fix-CodeExample-component-hardcoded-and-not-interactive-#356
2 parents ea4924c + 3791e8e commit 041dc6e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

components/developers/SyntaxHighlighter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useEffect, useState } from 'react';
44
import { type Language } from './codeSnippets';
5-
import { getHighlighter, type Highlighter } from 'shiki';
5+
import { createHighlighter, type Highlighter } from 'shiki';
66

77
interface SyntaxHighlighterProps {
88
code: string;
@@ -23,7 +23,7 @@ export function SyntaxHighlighter({ code, language }: SyntaxHighlighterProps) {
2323
useEffect(() => {
2424
const initHighlighter = async () => {
2525
try {
26-
const hl = await getHighlighter({
26+
const hl = await createHighlighter({
2727
themes: ['github-light', 'github-dark'],
2828
langs: ['js', 'py', 'php', 'go'],
2929
});

0 commit comments

Comments
 (0)