From 9506fec9fd382610d0e7a43ad868c3e56f224368 Mon Sep 17 00:00:00 2001 From: chuipagro Date: Tue, 5 Nov 2024 20:26:30 +0800 Subject: [PATCH] fix: eslint --- front/src/components/drive/fileList.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/front/src/components/drive/fileList.tsx b/front/src/components/drive/fileList.tsx index 7f3c50d..f307617 100644 --- a/front/src/components/drive/fileList.tsx +++ b/front/src/components/drive/fileList.tsx @@ -1,9 +1,9 @@ +import { FolderIcon, FileText } from "lucide-react"; import React, { useState } from 'react'; import "@/app/(drive)/drive.css"; -import { FileListProps } from "@/utils/types"; import { Card, CardFooter, CardTitle, CardContent } from "@/components/ui/card"; -import { FolderIcon, FileText } from "lucide-react"; +import { FileListProps } from "@/utils/types"; type SortColumn = 'name' | 'size' | 'createdAt' | 'permission'; type SortOrder = 'asc' | 'desc'; @@ -29,14 +29,11 @@ const FileList: React.FC = ({ files, folders }) => { }); const sortedFolders = [...folders].sort((a, b) => { - const isAscending = sortOrder === 'asc' ? 1 : -1; + //const isAscending = sortOrder === 'asc' ? 1 : -1; //if (a[sortColumn] < b[sortColumn]) return -1 * isAscending; //if (a[sortColumn] > b[sortColumn]) return 1 * isAscending; return 0; }); - console.log(sortedFiles); - - return (