import { AddressWithStatus } from './interface' ; export const updateAddress = ( oldAddresses , ID , diff ) => { return oldAddresses . map ( ( oldAddress ) => { if ( oldAddress . ID === ID ) { return { ... oldAddress , ... diff } ; } return oldAddress ; } ) ; } ;