mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-02 14:51:18 +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 { useInfiniteQuery, useMutation } from "@tanstack/react-query"
|
||||||
import { Link, useNavigate } from "@tanstack/react-router"
|
import { Link, useNavigate } from "@tanstack/react-router"
|
||||||
import {
|
import {
|
||||||
@@ -101,8 +99,7 @@ function useTableColumns(
|
|||||||
directoryUrlFn: (directory: DirectoryInfo) => string,
|
directoryUrlFn: (directory: DirectoryInfo) => string,
|
||||||
readOnly: boolean,
|
readOnly: boolean,
|
||||||
): ColumnDef<DirectoryItem>[] {
|
): ColumnDef<DirectoryItem>[] {
|
||||||
return useMemo(
|
return useMemo(() => {
|
||||||
() => {
|
|
||||||
const columns: ColumnDef<DirectoryItem>[] = []
|
const columns: ColumnDef<DirectoryItem>[] = []
|
||||||
if (!readOnly) {
|
if (!readOnly) {
|
||||||
columns.push({
|
columns.push({
|
||||||
@@ -163,9 +160,7 @@ function useTableColumns(
|
|||||||
switch (row.original.kind) {
|
switch (row.original.kind) {
|
||||||
case "file":
|
case "file":
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>{formatFileSize(row.original.size)}</div>
|
||||||
{formatFileSize(row.original.size)}
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
case "directory":
|
case "directory":
|
||||||
return <div className="font-mono">-</div>
|
return <div className="font-mono">-</div>
|
||||||
@@ -178,9 +173,7 @@ function useTableColumns(
|
|||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{new Date(
|
{new Date(row.original.createdAt).toLocaleString()}
|
||||||
row.original.createdAt,
|
|
||||||
).toLocaleString()}
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -188,9 +181,7 @@ function useTableColumns(
|
|||||||
)
|
)
|
||||||
|
|
||||||
return columns
|
return columns
|
||||||
},
|
}, [onOpenFile, directoryUrlFn, readOnly])
|
||||||
[onOpenFile, directoryUrlFn, readOnly],
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function DirectoryContentTable({
|
export function DirectoryContentTable({
|
||||||
|
|||||||
Reference in New Issue
Block a user