import { ScrollView, Text, View } from "react-native"; import { UserLoginLog } from "@/store/api/usersApi"; import { formatDate, formatTimeWithSeconds } from "@/utils/dateUtils"; import { reasonLabel } from "@/utils/loginUtils"; interface MobileLogsTableProps { logs: UserLoginLog[] | null | undefined; } export const MobileLogsTable = ({ logs }: MobileLogsTableProps) => { return ( {logs?.map((log) => ( {log.name}{" "} ({log.email}) Time: {formatDate(log.lastLoginAt)}{" "} {formatTimeWithSeconds(log.lastLoginAt)} Login activity: {log.activity} {log.status === "FAILURE" && reasonLabel(log.failureReason) ? ` - ${reasonLabel(log.failureReason)}` : ""} ))} ); };