From bab3ae809cb6027faef7b9d09dc4fb31095dde80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Jun 2025 11:02:29 +0000 Subject: [PATCH 1/3] build(deps): bump react and @types/react in /frontend Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) and [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react). These dependencies needed to be updated together. Updates `react` from 18.3.1 to 19.1.0 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v19.1.0/packages/react) Updates `@types/react` from 18.3.23 to 19.1.6 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: react dependency-version: 19.1.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: "@types/react" dependency-version: 19.1.6 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- frontend/package-lock.json | 44 ++++++++++++++++---------------------- frontend/package.json | 4 ++-- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 09f0da03..77e806da 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -15,7 +15,7 @@ "i18next-browser-languagedetector": "^8.0.2", "mermaid": "^11.6.0", "prop-types": "^15.8.1", - "react": "^18.2.0", + "react": "^19.1.0", "react-chartjs-2": "^5.3.0", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", @@ -33,7 +33,7 @@ }, "devDependencies": { "@types/mermaid": "^9.1.0", - "@types/react": "^18.0.27", + "@types/react": "^19.1.8", "@types/react-dom": "^18.3.0", "@types/react-helmet": "^6.1.11", "@types/react-syntax-highlighter": "^15.5.13", @@ -2138,18 +2138,12 @@ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, - "node_modules/@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" - }, "node_modules/@types/react": { - "version": "18.3.23", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.23.tgz", - "integrity": "sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==", + "version": "19.1.8", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.8.tgz", + "integrity": "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g==", "license": "MIT", "dependencies": { - "@types/prop-types": "*", "csstype": "^3.0.2" } }, @@ -9157,12 +9151,10 @@ ] }, "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", + "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -9238,6 +9230,15 @@ "react": ">=16.3.0" } }, + "node_modules/react-helmet/node_modules/react-side-effect": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", + "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", + "license": "MIT", + "peerDependencies": { + "react": "^16.3.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-i18next": { "version": "15.4.0", "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.4.0.tgz", @@ -9367,15 +9368,6 @@ "react-dom": ">=18" } }, - "node_modules/react-side-effect": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", - "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", - "license": "MIT", - "peerDependencies": { - "react": "^16.3.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-syntax-highlighter": { "version": "15.6.1", "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.6.1.tgz", diff --git a/frontend/package.json b/frontend/package.json index b4a90e0c..caafd978 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,7 +26,7 @@ "i18next-browser-languagedetector": "^8.0.2", "mermaid": "^11.6.0", "prop-types": "^15.8.1", - "react": "^18.2.0", + "react": "^19.1.0", "react-chartjs-2": "^5.3.0", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", @@ -44,7 +44,7 @@ }, "devDependencies": { "@types/mermaid": "^9.1.0", - "@types/react": "^18.0.27", + "@types/react": "^19.1.8", "@types/react-dom": "^18.3.0", "@types/react-helmet": "^6.1.11", "@types/react-syntax-highlighter": "^15.5.13", From 7077ca5e98f0e21d9935e6942bd020084a234469 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Fri, 20 Jun 2025 17:36:28 +0530 Subject: [PATCH 2/3] (chore/upgrade) migrate to react v19 --- frontend/package-lock.json | 91 ++++--------------- frontend/package.json | 8 +- frontend/src/components/DocumentHead.tsx | 52 +++++++++++ .../src/conversation/SharedConversation.tsx | 26 ++---- 4 files changed, 83 insertions(+), 94 deletions(-) create mode 100644 frontend/src/components/DocumentHead.tsx diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 77e806da..e27d0e8b 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,16 +11,15 @@ "@reduxjs/toolkit": "^2.8.2", "chart.js": "^4.4.4", "clsx": "^2.1.1", + "copy-to-clipboard": "^3.3.3", "i18next": "^24.2.0", "i18next-browser-languagedetector": "^8.0.2", "mermaid": "^11.6.0", "prop-types": "^15.8.1", "react": "^19.1.0", "react-chartjs-2": "^5.3.0", - "react-copy-to-clipboard": "^5.1.0", - "react-dom": "^18.3.1", + "react-dom": "^19.0.0", "react-dropzone": "^14.3.8", - "react-helmet": "^6.1.0", "react-i18next": "^15.4.0", "react-markdown": "^9.0.1", "react-redux": "^9.2.0", @@ -34,8 +33,7 @@ "devDependencies": { "@types/mermaid": "^9.1.0", "@types/react": "^19.1.8", - "@types/react-dom": "^18.3.0", - "@types/react-helmet": "^6.1.11", + "@types/react-dom": "^19.0.0", "@types/react-syntax-highlighter": "^15.5.13", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.62.0", @@ -2148,22 +2146,13 @@ } }, "node_modules/@types/react-dom": { - "version": "18.3.0", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", - "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", - "dev": true, - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/react-helmet": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.11.tgz", - "integrity": "sha512-0QcdGLddTERotCXo3VFlUSWO3ztraw8nZ6e3zJSgG7apwV5xt+pJUS8ewPBqT4NYB1optGLprNQzFleIY84u/g==", + "version": "19.1.6", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.6.tgz", + "integrity": "sha512-4hOiT/dwO8Ko0gV1m/TJZYk3y0KBnY9vzDh7W+DH17b2HFSOGgdj33dhihPeuy3l0q23+4e+hoXHV6hCC4dCXw==", "dev": true, "license": "MIT", - "dependencies": { - "@types/react": "*" + "peerDependencies": { + "@types/react": "^19.0.0" } }, "node_modules/@types/react-syntax-highlighter": { @@ -9168,28 +9157,16 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, - "node_modules/react-copy-to-clipboard": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", - "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", - "dependencies": { - "copy-to-clipboard": "^3.3.1", - "prop-types": "^15.8.1" - }, - "peerDependencies": { - "react": "^15.3.0 || 16 || 17 || 18" - } - }, "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz", + "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==", + "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" + "scheduler": "^0.26.0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^19.1.0" } }, "node_modules/react-dropzone": { @@ -9209,36 +9186,6 @@ "react": ">= 16.8 || 18.0.0" } }, - "node_modules/react-fast-compare": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", - "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==", - "license": "MIT" - }, - "node_modules/react-helmet": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", - "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", - "license": "MIT", - "dependencies": { - "object-assign": "^4.1.1", - "prop-types": "^15.7.2", - "react-fast-compare": "^3.1.1", - "react-side-effect": "^2.1.0" - }, - "peerDependencies": { - "react": ">=16.3.0" - } - }, - "node_modules/react-helmet/node_modules/react-side-effect": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", - "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", - "license": "MIT", - "peerDependencies": { - "react": "^16.3.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-i18next": { "version": "15.4.0", "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.4.0.tgz", @@ -9846,12 +9793,10 @@ "license": "MIT" }, "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "dependencies": { - "loose-envify": "^1.1.0" - } + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", + "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", + "license": "MIT" }, "node_modules/semver": { "version": "6.3.1", diff --git a/frontend/package.json b/frontend/package.json index caafd978..acc39f58 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -22,16 +22,15 @@ "@reduxjs/toolkit": "^2.8.2", "chart.js": "^4.4.4", "clsx": "^2.1.1", + "copy-to-clipboard": "^3.3.3", "i18next": "^24.2.0", "i18next-browser-languagedetector": "^8.0.2", "mermaid": "^11.6.0", "prop-types": "^15.8.1", "react": "^19.1.0", "react-chartjs-2": "^5.3.0", - "react-copy-to-clipboard": "^5.1.0", - "react-dom": "^18.3.1", + "react-dom": "^19.0.0", "react-dropzone": "^14.3.8", - "react-helmet": "^6.1.0", "react-i18next": "^15.4.0", "react-markdown": "^9.0.1", "react-redux": "^9.2.0", @@ -45,8 +44,7 @@ "devDependencies": { "@types/mermaid": "^9.1.0", "@types/react": "^19.1.8", - "@types/react-dom": "^18.3.0", - "@types/react-helmet": "^6.1.11", + "@types/react-dom": "^19.0.0", "@types/react-syntax-highlighter": "^15.5.13", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.62.0", diff --git a/frontend/src/components/DocumentHead.tsx b/frontend/src/components/DocumentHead.tsx new file mode 100644 index 00000000..b52b0f84 --- /dev/null +++ b/frontend/src/components/DocumentHead.tsx @@ -0,0 +1,52 @@ +import React from 'react'; + +interface DocumentHeadProps { + title?: string; + description?: string; + keywords?: string; + ogTitle?: string; + ogDescription?: string; + ogImage?: string; + twitterCard?: string; + twitterTitle?: string; + twitterDescription?: string; + children?: React.ReactNode; +} + +export function DocumentHead({ + title, + description, + keywords, + ogTitle, + ogDescription, + ogImage, + twitterCard, + twitterTitle, + twitterDescription, + children, +}: DocumentHeadProps) { + return ( + <> + {title && {title}} + {description && } + {keywords && } + + {/* Open Graph */} + {ogTitle && } + {ogDescription && ( + + )} + {ogImage && } + + {/* Twitter */} + {twitterCard && } + {twitterTitle && } + {twitterDescription && ( + + )} + + {/* Additional elements */} + {children} + + ); +} diff --git a/frontend/src/conversation/SharedConversation.tsx b/frontend/src/conversation/SharedConversation.tsx index 22efae4e..a5ac5d48 100644 --- a/frontend/src/conversation/SharedConversation.tsx +++ b/frontend/src/conversation/SharedConversation.tsx @@ -1,5 +1,4 @@ import { useEffect, useState } from 'react'; -import { Helmet } from 'react-helmet'; import { useTranslation } from 'react-i18next'; import { useDispatch, useSelector } from 'react-redux'; import { useNavigate, useParams } from 'react-router-dom'; @@ -24,6 +23,7 @@ import { updateQuery, } from './sharedConversationSlice'; import { selectCompletedAttachments } from '../upload/uploadSlice'; +import { DocumentHead } from '../components/DocumentHead'; export const SharedConversation = () => { const navigate = useNavigate(); @@ -129,21 +129,15 @@ export const SharedConversation = () => { return ( <> - - {`DocsGPT | ${title}`} - - - - - - - +

From 6834961dd178cef1fc7a891b18b122287920b4fc Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Fri, 20 Jun 2025 23:11:53 +0530 Subject: [PATCH 3/3] (fix:types) stricter in v19 --- frontend/src/components/ContextMenu.tsx | 6 +++--- frontend/src/components/DropdownMenu.tsx | 10 +++++----- frontend/src/components/MultiSelectPopup.tsx | 2 +- frontend/src/components/SourcesPopup.tsx | 2 +- frontend/src/components/ToolsPopup.tsx | 2 +- frontend/src/conversation/ConversationBubble.tsx | 2 +- frontend/src/hooks/index.ts | 4 ++-- frontend/src/settings/Documents.tsx | 6 +++--- frontend/src/settings/Tools.tsx | 4 ++-- frontend/src/upload/Upload.tsx | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/ContextMenu.tsx b/frontend/src/components/ContextMenu.tsx index 3713ffe6..6736fd7a 100644 --- a/frontend/src/components/ContextMenu.tsx +++ b/frontend/src/components/ContextMenu.tsx @@ -14,10 +14,10 @@ interface ContextMenuProps { isOpen: boolean; setIsOpen: (isOpen: boolean) => void; options: MenuOption[]; - anchorRef: React.RefObject; - className?: string; - position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'; + anchorRef: React.RefObject; + position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'; offset?: { x: number; y: number }; + className?: string; } export default function ContextMenu({ diff --git a/frontend/src/components/DropdownMenu.tsx b/frontend/src/components/DropdownMenu.tsx index 3fe85508..d40157f2 100644 --- a/frontend/src/components/DropdownMenu.tsx +++ b/frontend/src/components/DropdownMenu.tsx @@ -7,12 +7,12 @@ type DropdownMenuProps = { onSelect: (value: string) => void; defaultValue?: string; icon?: string; - isOpen?: boolean; - onOpenChange?: (isOpen: boolean) => void; - anchorRef?: React.RefObject; - className?: string; - position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'; + isOpen: boolean; + onOpenChange: (isOpen: boolean) => void; + anchorRef: React.RefObject; + position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'; offset?: { x: number; y: number }; + className?: string; }; export default function DropdownMenu({ diff --git a/frontend/src/components/MultiSelectPopup.tsx b/frontend/src/components/MultiSelectPopup.tsx index ef1ec41f..2047c12b 100644 --- a/frontend/src/components/MultiSelectPopup.tsx +++ b/frontend/src/components/MultiSelectPopup.tsx @@ -17,7 +17,7 @@ export type OptionType = { type MultiSelectPopupProps = { isOpen: boolean; onClose: () => void; - anchorRef: React.RefObject; + anchorRef: React.RefObject; options: OptionType[]; selectedIds: Set; onSelectionChange: (newSelectedIds: Set) => void; diff --git a/frontend/src/components/SourcesPopup.tsx b/frontend/src/components/SourcesPopup.tsx index bdfb7538..47bda538 100644 --- a/frontend/src/components/SourcesPopup.tsx +++ b/frontend/src/components/SourcesPopup.tsx @@ -16,7 +16,7 @@ import { ActiveState } from '../models/misc'; type SourcesPopupProps = { isOpen: boolean; onClose: () => void; - anchorRef: React.RefObject; + anchorRef: React.RefObject; handlePostDocumentSelect: (doc: Doc | null) => void; setUploadModalState: React.Dispatch>; }; diff --git a/frontend/src/components/ToolsPopup.tsx b/frontend/src/components/ToolsPopup.tsx index 4948bad6..b451ace6 100644 --- a/frontend/src/components/ToolsPopup.tsx +++ b/frontend/src/components/ToolsPopup.tsx @@ -14,7 +14,7 @@ import { useDarkTheme } from '../hooks'; interface ToolsPopupProps { isOpen: boolean; onClose: () => void; - anchorRef: React.RefObject; + anchorRef: React.RefObject; } export default function ToolsPopup({ diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index 04800c83..13468f87 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -96,7 +96,7 @@ const ConversationBubble = forwardRef< const [isDislikeClicked, setIsDislikeClicked] = useState(false); const [activeTooltip, setActiveTooltip] = useState(null); const [isSidebarOpen, setIsSidebarOpen] = useState(false); - const editableQueryRef = useRef(null); + const editableQueryRef = useRef(null); const [isQuestionCollapsed, setIsQuestionCollapsed] = useState(true); useOutsideAlerter(editableQueryRef, () => setIsEditClicked(false), [], true); diff --git a/frontend/src/hooks/index.ts b/frontend/src/hooks/index.ts index 1b9f9b87..49e4cd55 100644 --- a/frontend/src/hooks/index.ts +++ b/frontend/src/hooks/index.ts @@ -1,7 +1,7 @@ import { useEffect, RefObject, useState } from 'react'; export function useOutsideAlerter( - ref: RefObject, + ref: RefObject, handler: () => void, additionalDeps: unknown[], handleEscapeKey?: boolean, @@ -30,7 +30,7 @@ export function useOutsideAlerter( document.removeEventListener('keydown', handleEscape); } }; - }, [ref, ...additionalDeps]); + }, [ref, handler, handleEscapeKey, ...additionalDeps]); } export function useMediaQuery() { diff --git a/frontend/src/settings/Documents.tsx b/frontend/src/settings/Documents.tsx index 5a733beb..b6a84e50 100644 --- a/frontend/src/settings/Documents.tsx +++ b/frontend/src/settings/Documents.tsx @@ -68,9 +68,9 @@ export default function Documents({ const [totalPages, setTotalPages] = useState(1); const [activeMenuId, setActiveMenuId] = useState(null); - const menuRefs = useRef<{ [key: string]: React.RefObject }>( - {}, - ); + const menuRefs = useRef<{ + [key: string]: React.RefObject; + }>({}); // Create or get a ref for each document wrapper div (not the td) const getMenuRef = (docId: string) => { diff --git a/frontend/src/settings/Tools.tsx b/frontend/src/settings/Tools.tsx index a3d37557..d387ce00 100644 --- a/frontend/src/settings/Tools.tsx +++ b/frontend/src/settings/Tools.tsx @@ -35,7 +35,7 @@ export default function Tools() { const [loading, setLoading] = React.useState(false); const [activeMenuId, setActiveMenuId] = React.useState(null); const menuRefs = React.useRef<{ - [key: string]: React.RefObject; + [key: string]: React.RefObject; }>({}); const [deleteModalState, setDeleteModalState] = React.useState('INACTIVE'); @@ -46,7 +46,7 @@ export default function Tools() { React.useEffect(() => { userTools.forEach((tool) => { if (!menuRefs.current[tool.id]) { - menuRefs.current[tool.id] = React.createRef(); + menuRefs.current[tool.id] = React.createRef(); } }); }, [userTools]); diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index 61a7bc47..3e5dd27a 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -194,7 +194,7 @@ function Upload({ }>(); const { t } = useTranslation(); - const setTimeoutRef = useRef(); + const setTimeoutRef = useRef(null); const urlOptions: { label: string; value: IngestorType }[] = [ { label: 'Crawler', value: 'crawler' },