style: clean up code with prettier and eslint

This commit is contained in:
openhands committed 2026-07-12 20:31:05 +02:00
1 parent 60278b9e71
commit fb8e77bb68
378 files changed
+22407 -20689

No files matched your search

+20 -20
View File
@@ -1,38 +1,38 @@
'use client'
"use client";
import { DataTable } from '@/components/admin/data-table'
import { formatTimestamp } from '@/lib/admin-helpers'
import type { DataTableColumn, PaginatedResult } from '@/types'
import { DataTable } from "@/components/admin/data-table";
import { formatTimestamp } from "@/lib/admin-helpers";
import type { DataTableColumn, PaginatedResult } from "@/types";
interface CommandLogRow {
id: number
username: string
command: string
params: string
timestamp: number
id: number;
username: string;
command: string;
params: string;
timestamp: number;
}
const columns: DataTableColumn<CommandLogRow>[] = [
{ key: 'id', label: 'ID', sortable: true },
{ key: 'username', label: 'User' },
{ key: 'command', label: 'Command', sortable: true },
{ key: "id", label: "ID", sortable: true },
{ key: "username", label: "User" },
{ key: "command", label: "Command", sortable: true },
{
key: 'params',
label: 'Params',
key: "params",
label: "Params",
render: (value) => (
<span className="max-w-[200px] truncate block font-mono text-sm">{String(value) || '-'}</span>
<span className="max-w-[200px] truncate block font-mono text-sm">{String(value) || "-"}</span>
),
},
{
key: 'timestamp',
label: 'Time',
key: "timestamp",
label: "Time",
sortable: true,
render: (value) => <span>{formatTimestamp(Number(value))}</span>,
},
]
];
interface CommandsTableProps {
data: PaginatedResult<CommandLogRow>
data: PaginatedResult<CommandLogRow>;
}
export function CommandsTable({ data }: CommandsTableProps) {
@@ -43,5 +43,5 @@ export function CommandsTable({ data }: CommandsTableProps) {
searchPlaceholder="Search by username, command, or params..."
exportUrl="/api/admin/export?type=commands"
/>
)
);
}