diff --git a/frontend/src/components/Modals/ManageWorkspace/Documents/Directory/FileRow/index.jsx b/frontend/src/components/Modals/ManageWorkspace/Documents/Directory/FileRow/index.jsx index e679896f..1b8cb81e 100644 --- a/frontend/src/components/Modals/ManageWorkspace/Documents/Directory/FileRow/index.jsx +++ b/frontend/src/components/Modals/ManageWorkspace/Documents/Directory/FileRow/index.jsx @@ -1,26 +1,13 @@ -import { useState } from "react"; +import React from "react"; import { formatDate, getFileExtension, middleTruncate, } from "@/utils/directories"; import { File } from "@phosphor-icons/react"; -import debounce from "lodash.debounce"; +import { Tooltip } from "react-tooltip"; export default function FileRow({ item, selected, toggleSelection }) { - const [showTooltip, setShowTooltip] = useState(false); - - const handleShowTooltip = () => { - setShowTooltip(true); - }; - - const handleHideTooltip = () => { - setShowTooltip(false); - }; - - const handleMouseEnter = debounce(handleShowTooltip, 500); - const handleMouseLeave = debounce(handleHideTooltip, 500); - return (
- {middleTruncate(item.title, 17)} -
- {showTooltip && ( -+ {middleTruncate(item.title, 60)} +
- {formatDate(item?.published)} -
-- {getFileExtension(item.url)} -
-Cached
{item.title}
++ Date: {formatDate(item?.published)} +
++ Type: {getFileExtension(item.url).toUpperCase()} +
+Name
-Date
-Kind
- {middleTruncate(item.title, 17)} -
- {showTooltip && ( -+ {middleTruncate(item.title, 60)} +
- {formatDate(item?.published)} -
-- {getFileExtension(item.url)} -
-{item.title}
++ Date: {formatDate(item?.published)} +
++ Type: {getFileExtension(item.url).toUpperCase()} +
+Name
-Date
-Kind
Name
-Date
-Kind