From d5fa3ddd94dc078498c5917d08efd74c1e904cf1 Mon Sep 17 00:00:00 2001 From: Connor Yoh Date: Thu, 14 Aug 2025 15:49:10 +0100 Subject: [PATCH] Revert unused changes --- frontend/src/components/shared/FileCard.tsx | 44 +-------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/frontend/src/components/shared/FileCard.tsx b/frontend/src/components/shared/FileCard.tsx index 991132ef0..e4ff60eea 100644 --- a/frontend/src/components/shared/FileCard.tsx +++ b/frontend/src/components/shared/FileCard.tsx @@ -5,13 +5,10 @@ import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf"; import StorageIcon from "@mui/icons-material/Storage"; import VisibilityIcon from "@mui/icons-material/Visibility"; import EditIcon from "@mui/icons-material/Edit"; -import PushPinIcon from "@mui/icons-material/PushPin"; -import PushPinOutlinedIcon from "@mui/icons-material/PushPinOutlined"; import { FileWithUrl } from "../../types/file"; import { getFileSize, getFileDate } from "../../utils/fileUtils"; import { useIndexedDBThumbnail } from "../../hooks/useIndexedDBThumbnail"; -import { useFileContext } from "../../contexts/FileContext"; interface FileCardProps { file: FileWithUrl; @@ -28,9 +25,6 @@ const FileCard = ({ file, onRemove, onDoubleClick, onView, onEdit, isSelected, o const { t } = useTranslation(); const { thumbnail: thumb, isGenerating } = useIndexedDBThumbnail(file); const [isHovered, setIsHovered] = useState(false); - const { pinFile, unpinFile, isFilePinned } = useFileContext(); - - const isPinned = isFilePinned(file as File); return ( - {/* Pin indicator - always visible when pinned */} - {isPinned && ( -
- -
- )} - {/* Hover action buttons */} - {isHovered && (onView || onEdit || true) && ( + {isHovered && (onView || onEdit) && (
e.stopPropagation()} > - {/* Pin/Unpin button */} - - { - e.stopPropagation(); - if (isPinned) { - unpinFile(file as File); - } else { - pinFile(file as File); - } - }} - > - {isPinned ? : } - - - {onView && (