🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Refactor TrackedButton component for improved code clarity
Bill Yangdb448f1ed95c
diff --git a/docs-v2/src/components/TrackedButton.tsx b/docs-v2/src/components/TrackedButton.tsxindex ae764783d..bf869fd6d 100644--- a/docs-v2/src/components/TrackedButton.tsx+++ b/docs-v2/src/components/TrackedButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @typescript-eslint/no-explicit-any */"use client";import { ReactNode } from "react";@@ -16,13 +17,7 @@ declare global {}}-export function TrackedButton({- children,- eventName,- eventData = {},- className,- onClick,-}: TrackedButtonProps) {+export function TrackedButton({ children, eventName, eventData = {}, className, onClick }: TrackedButtonProps) {const handleClick = () => {if (typeof window !== "undefined" && window.dataLayer) {window.dataLayer.push({@@ -41,4 +36,4 @@ export function TrackedButton({{children}</button>);-}\ No newline at end of file+}