import { DataTable, Text } from "react-native-paper"; import { View } from "react-native"; import { UserLoginLog } from "@/store/api/usersApi"; import { formatDate, formatTimeWithSeconds } from "@/utils/dateUtils"; import { LogsTableHeader } from "@/components/features/logs/LogsTableHeader"; import { TableSortDirection } from "@/constants/tableSortDirectionEnum"; import { reasonLabel } from "@/utils/loginUtils"; interface DesktopLogsTableProps { logs: UserLoginLog[]; sortColumn: string | null; sortDirection: TableSortDirection; onSort: (column: string) => void; } export const DesktopLogsTable = ({ logs, sortColumn, sortDirection, onSort, }: DesktopLogsTableProps) => { return ( {logs.map((log) => ( {log.name} {log.email} {formatDate(log.lastLoginAt)} {formatTimeWithSeconds(log.lastLoginAt)} {log.activity} {log.status === "FAILURE" && reasonLabel(log.failureReason) ? ` - ${reasonLabel(log.failureReason)}` : ""} ))} ); };