diff --git a/apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.tsx b/apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.jsx similarity index 87% rename from apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.tsx rename to apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.jsx index 3d59643f46..de68adbbbd 100644 --- a/apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.tsx +++ b/apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.jsx @@ -1,10 +1,9 @@ -import type React from 'react'; -import { useState } from 'react'; +import React, { useState } from 'react'; import styles from '../styles.module.css'; // Custom component for button text -function ButtonText({ isLoading, isCopied }: { isLoading: boolean; isCopied: boolean }) { +function ButtonText({ isLoading, isCopied }) { if (isLoading) { return 'Copying...'; } @@ -19,8 +18,8 @@ export default function CopyForLLM() { const [isCopied, setIsCopied] = useState(false); const handleCopy = async () => { - if ((window as any).analytics) { - (window as any).analytics.track('Clicked', { + if (window.analytics) { + window.analytics.track('Clicked', { app: 'docs', button_text: 'Copy for LLM', element: 'llm-buttons.copyForLLM', diff --git a/apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.tsx b/apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.jsx similarity index 90% rename from apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.tsx rename to apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.jsx index 0f6e751fda..fc47cb4e4b 100644 --- a/apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.tsx +++ b/apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.jsx @@ -4,8 +4,8 @@ import styles from '../styles.module.css'; export default function ViewAsMarkdown() { const handleClick = () => { - if ((window as any).analytics) { - (window as any).analytics.track('Clicked', { + if (window.analytics) { + window.analytics.track('Clicked', { app: 'docs', button_text: 'View as Markdown', element: 'llm-buttons.viewAsMarkdown', diff --git a/apify-docs-theme/src/theme/LLMButtons/index.tsx b/apify-docs-theme/src/theme/LLMButtons/index.jsx similarity index 100% rename from apify-docs-theme/src/theme/LLMButtons/index.tsx rename to apify-docs-theme/src/theme/LLMButtons/index.jsx diff --git a/package-lock.json b/package-lock.json index bba74baa27..313ea2318a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,7 +74,7 @@ }, "apify-docs-theme": { "name": "@apify/docs-theme", - "version": "1.0.199", + "version": "1.0.201", "license": "ISC", "dependencies": { "@apify/docs-search-modal": "^1.2.2",