mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-02 15:01:17 +00:00
chore: remove outdated todo comment
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// TODO: make table sorting work (right now not working probably because different params share same query key)
|
||||
|
||||
import { useInfiniteQuery, useMutation } from "@tanstack/react-query"
|
||||
import { Link, useNavigate } from "@tanstack/react-router"
|
||||
import {
|
||||
@@ -101,8 +99,7 @@ function useTableColumns(
|
||||
directoryUrlFn: (directory: DirectoryInfo) => string,
|
||||
readOnly: boolean,
|
||||
): ColumnDef<DirectoryItem>[] {
|
||||
return useMemo(
|
||||
() => {
|
||||
return useMemo(() => {
|
||||
const columns: ColumnDef<DirectoryItem>[] = []
|
||||
if (!readOnly) {
|
||||
columns.push({
|
||||
@@ -163,9 +160,7 @@ function useTableColumns(
|
||||
switch (row.original.kind) {
|
||||
case "file":
|
||||
return (
|
||||
<div>
|
||||
{formatFileSize(row.original.size)}
|
||||
</div>
|
||||
<div>{formatFileSize(row.original.size)}</div>
|
||||
)
|
||||
case "directory":
|
||||
return <div className="font-mono">-</div>
|
||||
@@ -178,9 +173,7 @@ function useTableColumns(
|
||||
cell: ({ row }) => {
|
||||
return (
|
||||
<div>
|
||||
{new Date(
|
||||
row.original.createdAt,
|
||||
).toLocaleString()}
|
||||
{new Date(row.original.createdAt).toLocaleString()}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
@@ -188,9 +181,7 @@ function useTableColumns(
|
||||
)
|
||||
|
||||
return columns
|
||||
},
|
||||
[onOpenFile, directoryUrlFn, readOnly],
|
||||
)
|
||||
}, [onOpenFile, directoryUrlFn, readOnly])
|
||||
}
|
||||
|
||||
export function DirectoryContentTable({
|
||||
|
||||
Reference in New Issue
Block a user