Compare commits
2 commits
712887d86e
...
f25ad2d6a7
Author | SHA1 | Date | |
---|---|---|---|
f25ad2d6a7 | |||
d32e6826b5 |
2 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ const customPortableTextComponents: PortableTextComponents = {
|
||||||
const language = value.language || "none";
|
const language = value.language || "none";
|
||||||
const grammar = Prism.languages[language];
|
const grammar = Prism.languages[language];
|
||||||
|
|
||||||
if (!grammar) {
|
if (language != "none" && !grammar) {
|
||||||
console.error(`No grammar found for language: "${language}"`);
|
console.error(`No grammar found for language: "${language}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ export default function CopyButton({ code }: { code: string }) {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
onClick={copyCode}
|
onClick={copyCode}
|
||||||
className="absolute top-2 right-2 bg-accent hover:bg-muted p-2 rounded"
|
className="absolute top-2 right-2 bg-accent hover:bg-muted text-black dark:text-white p-2 rounded"
|
||||||
size={"icon"}
|
size={"icon"}
|
||||||
>
|
>
|
||||||
{copied ? <Check className="w-5 h-5" /> : <Copy className="w-5 h-5" />}
|
{copied ? <Check className="w-5 h-5" /> : <Copy className="w-5 h-5" />}
|
||||||
|
|
Loading…
Reference in a new issue