import React from 'react'; import {ArrowDown, ArrowUp} from 'lucide-react'; import ChangeRow from './ChangeRow'; const ChangeTable = ({ changes, title, icon, isIncoming, selectedChanges, onSelectChange, sortConfig, onRequestSort, isDevMode }) => { const sortedChanges = changesArray => { if (!sortConfig.key) return changesArray; return [...changesArray].sort((a, b) => { if (a[sortConfig.key] < b[sortConfig.key]) { return sortConfig.direction === 'ascending' ? -1 : 1; } if (a[sortConfig.key] > b[sortConfig.key]) { return sortConfig.direction === 'ascending' ? 1 : -1; } return 0; }); }; const SortableHeader = ({children, sortKey, className}) => { const isSorted = sortConfig.key === sortKey; return (
| Actions | Select |
|---|