diff --git a/quartz/components/Btn8831.tsx b/quartz/components/Btn8831.tsx
index 6561d5c..c1d6bec 100644
--- a/quartz/components/Btn8831.tsx
+++ b/quartz/components/Btn8831.tsx
@@ -55,22 +55,29 @@ export default (() => {
return groups
}
- // Function to render button content based on contentType
+ // Updated renderButtonContent function
function renderButtonContent(button: any): preact.VNode | null {
const contentType = button.contentType || "image" // Default to 'image'
if (contentType === "image") {
- return (
-
-
-
+ // Create the element
+ const imgElement = (
+
)
+
+ // If `button.url` is present, wrap the image in an `` tag
+ if (button.url) {
+ return {imgElement}
+ } else {
+ // If no `url`, return the image element without wrapping
+ return imgElement
+ }
} else if (contentType === "iframe") {
const iframeAttrs = button.iframeAttributes || {}
return
@@ -79,5 +86,6 @@ export default (() => {
return null
}
}
+
return Btn8831
}) satisfies QuartzComponentConstructor