aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-16 00:11:29 +0900
committernsfisis <nsfisis@gmail.com>2025-03-16 00:11:29 +0900
commit5df5ec12134b85e9c743ffd5b4da35aa0fed04e6 (patch)
treea5519606522c33c612bea515d4edd6b84d9579fb /frontend
parent42c6c97f0230c0969a87e601be1ee740bd017aa5 (diff)
downloadiosdc-japan-2025-albatross-5df5ec12134b85e9c743ffd5b4da35aa0fed04e6.tar.gz
iosdc-japan-2025-albatross-5df5ec12134b85e9c743ffd5b4da35aa0fed04e6.tar.zst
iosdc-japan-2025-albatross-5df5ec12134b85e9c743ffd5b4da35aa0fed04e6.zip
feat(frontend): show non-highlighted code until syntax highlighting complete
Diffstat (limited to 'frontend')
-rw-r--r--frontend/app/components/Gaming/CodeBlock.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/app/components/Gaming/CodeBlock.tsx b/frontend/app/components/Gaming/CodeBlock.tsx
index 36ccae1..16ff84e 100644
--- a/frontend/app/components/Gaming/CodeBlock.tsx
+++ b/frontend/app/components/Gaming/CodeBlock.tsx
@@ -29,7 +29,9 @@ export default function CodeBlock({ code, language }: Props) {
return (
<pre className="h-full w-full p-2 bg-gray-50 rounded-lg border border-gray-300 whitespace-pre-wrap break-words">
- {highlightedCode === null ? null : (
+ {highlightedCode === null ? (
+ <code>{code}</code>
+ ) : (
<code dangerouslySetInnerHTML={{ __html: highlightedCode }} />
)}
</pre>