diff --git a/quartz/components/Btn8831.tsx b/quartz/components/Btn8831.tsx index aad14ab..2429c64 100644 --- a/quartz/components/Btn8831.tsx +++ b/quartz/components/Btn8831.tsx @@ -3,52 +3,51 @@ import baseStyle from "./styles/footer.scss" import { useEffect, useState } from "preact/hooks" // Import the JSON data -import buttonsData from "./buttons.json" +import buttonsData from "../buttons.json" -// Define the component -const Btn8831: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { - // Since the data is static, you can directly use buttonsData - const [buttons, setButtons] = useState(buttonsData) +export default (() => { + // Define the component + const Btn8831: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { + // Since the data is static, you can directly use buttonsData + const [buttons, setButtons] = useState(buttonsData) - // Optional: If you need to perform any data manipulation or sorting, you can do it here - // For example, if buttonsData isn't sorted, but you need to sort it: - // useEffect(() => { - // const sortedButtons = [...buttonsData].sort(/* your sorting function */); - // setButtons(sortedButtons); - // }, []); + // Optional: If you need to perform any data manipulation or sorting, you can do it here + // For example, if buttonsData isn't sorted, but you need to sort it: + // useEffect(() => { + // const sortedButtons = [...buttonsData].sort(/* your sorting function */); + // setButtons(sortedButtons); + // }, []); - return ( -