frontend refactor

This commit is contained in:
Egor Pozharov
2026-04-14 17:10:13 +06:00
parent 0540218332
commit 9b90a8aa7f
14 changed files with 328 additions and 127 deletions
@@ -1,3 +1,4 @@
import { memo } from 'react';
import { MapPin, Phone } from 'lucide-react';
import type { Delivery } from '../../types';
import { pickupLocationLabels } from '../../types';
@@ -10,7 +11,7 @@ interface DeliveryRowProps {
onDelete: (id: string) => void;
}
export const DeliveryRow = ({ delivery, onStatusChange, onEdit, onDelete }: DeliveryRowProps) => {
export const DeliveryRow = memo(({ delivery, onStatusChange, onEdit, onDelete }: DeliveryRowProps) => {
const handleAddressClick = (e: React.MouseEvent) => {
e.stopPropagation();
const encodedAddress = encodeURIComponent(delivery.address);
@@ -75,4 +76,6 @@ export const DeliveryRow = ({ delivery, onStatusChange, onEdit, onDelete }: Deli
</td>
</tr>
);
};
});
DeliveryRow.displayName = 'DeliveryRow';