diff --git a/frontend/src/components/Chunks.tsx b/frontend/src/components/Chunks.tsx index 0800cfa0..b7d97080 100644 --- a/frontend/src/components/Chunks.tsx +++ b/frontend/src/components/Chunks.tsx @@ -1,8 +1,8 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState, useEffect, useRef } from 'react'; import { useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; import { selectToken } from '../preferences/preferenceSlice'; -import { useDarkTheme, useLoaderState, useMediaQuery } from '../hooks'; +import { useDarkTheme, useLoaderState, useMediaQuery, useOutsideAlerter } from '../hooks'; import userService from '../api/services/userService'; import ArrowLeft from '../assets/arrow-left.svg'; import NoFilesIcon from '../assets/no-files.svg'; @@ -13,7 +13,9 @@ import ConfirmationModal from '../modals/ConfirmationModal'; import { ActiveState } from '../models/misc'; import { ChunkType } from '../settings/types'; import Pagination from './DocumentPagination'; - +import FileIcon from '../assets/file.svg'; +import FolderIcon from '../assets/folder.svg'; +import SearchIcon from '../assets/search.svg'; interface LineNumberedTextareaProps { value: string; onChange: (value: string) => void; @@ -21,6 +23,7 @@ interface LineNumberedTextareaProps { ariaLabel?: string; className?: string; editable?: boolean; + onDoubleClick?: () => void; } const LineNumberedTextarea: React.FC = ({ @@ -29,7 +32,8 @@ const LineNumberedTextarea: React.FC = ({ placeholder, ariaLabel, className = '', - editable = true + editable = true, + onDoubleClick }) => { const { isMobile } = useMediaQuery(); @@ -62,9 +66,10 @@ const LineNumberedTextarea: React.FC = ({ ))}