export const checkDuplicateTrainData = (currentTrainArray) => { const notNyujoData = currentTrainArray.filter((d) => d.delay !== "入線"); if (currentTrainArray.length == 1) return currentTrainArray[0]; if (notNyujoData.length == 0) return currentTrainArray[0]; else return notNyujoData[0]; };