From 284662fe3650c551aa8af6b53465fdc119beb5bd Mon Sep 17 00:00:00 2001 From: Heli-o Date: Mon, 14 Oct 2024 18:40:38 +0200 Subject: [PATCH] stopped invoking btn class --- quartz/components/Btn8831.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/quartz/components/Btn8831.tsx b/quartz/components/Btn8831.tsx index 88d0567..501a337 100644 --- a/quartz/components/Btn8831.tsx +++ b/quartz/components/Btn8831.tsx @@ -3,6 +3,7 @@ import style from "./styles/buttons8831.scss" // Import the JSON data import buttonsData from "./buttons.json" +import { List } from "mdast-util-to-hast/lib/handlers/list" export default (() => { // Define the component @@ -40,14 +41,14 @@ export default (() => { } // Function to group buttons by type - function groupButtonsByType(buttons) { - const groups = { + function groupButtonsByType(buttons: any[]) { + const groups: { [key: string]: any[] } = { misc: [], friend: [], standard: [], } - buttons.forEach((button) => { + buttons.forEach((button: any) => { let type = button.type?.toLowerCase() || "standard" if (type === "fren") type = "friend" if (!groups[type]) type = "standard" // Default to 'standard' if type is unrecognized @@ -58,7 +59,7 @@ export default (() => { } // Function to render button content based on contentType - function renderButtonContent(button) { + function renderButtonContent(button: any): preact.VNode | null { const contentType = button.contentType || "image" // Default to 'image' if (contentType === "image") { @@ -80,4 +81,4 @@ export default (() => { Btn8831.css = style return Btn8831 -})() satisfies QuartzComponentConstructor +}) satisfies QuartzComponentConstructor