diff --git a/src/components/MinecraftInventory/MinecraftInventory.tsx b/src/components/MinecraftInventory/MinecraftInventory.tsx index 48a2f01..e070a85 100644 --- a/src/components/MinecraftInventory/MinecraftInventory.tsx +++ b/src/components/MinecraftInventory/MinecraftInventory.tsx @@ -3,6 +3,7 @@ import React from "react"; import MinecraftSlot from "../MinecraftSlot/MinecraftSlot"; import styles from "./styles.module.css"; +import BrowserOnly from "@docusaurus/BrowserOnly"; type MinecraftInventoryProps = { slots: { itemName: string; tooltip: string; link?: string }[]; @@ -13,12 +14,9 @@ const MinecraftInventory: React.FC = ({ slots, headerText, }) => { - /*if (/\blinux\b/i.test(navigator.userAgent)) { - document.body.className += " linux"; - }*/ - return (
+ {() => }
{headerText &&
{headerText}
} {(slots.length % 9 > 0 @@ -43,3 +41,10 @@ const MinecraftInventory: React.FC = ({ }; export default MinecraftInventory; + +function LinuxClassAppender() { + if (/\blinux\b/i.test(navigator.userAgent)) { + document.body.className += " linux"; + } + return null; +}