aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-landing/components/CodeBlock.tsx
diff options
context:
space:
mode:
authorGravatar Ashcon Partovi <ashcon@partovi.net> 2022-12-13 17:25:46 -0800
committerGravatar Ashcon Partovi <ashcon@partovi.net> 2022-12-13 17:25:46 -0800
commit375f69559fe26bf358573b8ecb2ad5f8ef7aac17 (patch)
treef0949a1c9d14b18613eb031b4ac535b95f74c3fb /packages/bun-landing/components/CodeBlock.tsx
parent7d15a040fdb9f486d14796ec066701dbdbb70ecb (diff)
downloadbun-375f69559fe26bf358573b8ecb2ad5f8ef7aac17.tar.gz
bun-375f69559fe26bf358573b8ecb2ad5f8ef7aac17.tar.zst
bun-375f69559fe26bf358573b8ecb2ad5f8ef7aac17.zip
Move bun-landing to another repository
Diffstat (limited to 'packages/bun-landing/components/CodeBlock.tsx')
-rw-r--r--packages/bun-landing/components/CodeBlock.tsx15
1 files changed, 0 insertions, 15 deletions
diff --git a/packages/bun-landing/components/CodeBlock.tsx b/packages/bun-landing/components/CodeBlock.tsx
deleted file mode 100644
index 7f16dc066..000000000
--- a/packages/bun-landing/components/CodeBlock.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import * as shiki from "shiki";
-
-// because we don't want to wait for it to reload everytime this page reloads
-globalThis._highlighter ||= await shiki.getHighlighter({
- theme: "dracula",
-});
-
-const highlighter = globalThis._highlighter as shiki.Highlighter;
-
-export default function CodeBlock({ children, lang = "js" }) {
- const html = highlighter.codeToHtml(children.trim(), { lang });
- return (
- <div className="CodeBlock" dangerouslySetInnerHTML={{ __html: html }} />
- );
-}