Skip to content

Commit 1823451

Browse files
authored
fix: Use jsx for LLMButtons (#1825)
As external repos build still failing due to TypeScript: https://github.com/apify/apify-sdk-python/actions/runs/17154272848/job/48667315212?pr=552#step:9:185
1 parent 628bff4 commit 1823451

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.tsx renamed to apify-docs-theme/src/theme/LLMButtons/CopyForLLM/index.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import type React from 'react';
2-
import { useState } from 'react';
1+
import React, { useState } from 'react';
32

43
import styles from '../styles.module.css';
54

65
// Custom component for button text
7-
function ButtonText({ isLoading, isCopied }: { isLoading: boolean; isCopied: boolean }) {
6+
function ButtonText({ isLoading, isCopied }) {
87
if (isLoading) {
98
return 'Copying...';
109
}
@@ -19,8 +18,8 @@ export default function CopyForLLM() {
1918
const [isCopied, setIsCopied] = useState(false);
2019

2120
const handleCopy = async () => {
22-
if ((window as any).analytics) {
23-
(window as any).analytics.track('Clicked', {
21+
if (window.analytics) {
22+
window.analytics.track('Clicked', {
2423
app: 'docs',
2524
button_text: 'Copy for LLM',
2625
element: 'llm-buttons.copyForLLM',

apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.tsx renamed to apify-docs-theme/src/theme/LLMButtons/ViewAsMarkdown/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import styles from '../styles.module.css';
44

55
export default function ViewAsMarkdown() {
66
const handleClick = () => {
7-
if ((window as any).analytics) {
8-
(window as any).analytics.track('Clicked', {
7+
if (window.analytics) {
8+
window.analytics.track('Clicked', {
99
app: 'docs',
1010
button_text: 'View as Markdown',
1111
element: 'llm-buttons.viewAsMarkdown',
File renamed without changes.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)