From aaab0a933b60202d1a1a5e4f8ffb0d244388f48c Mon Sep 17 00:00:00 2001 From: Adrien Date: Mon, 30 Jan 2023 22:47:12 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Replace=20for=20loop=20with=20a?= =?UTF-8?q?=20=20control=20flow=20for=20StopsManager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/stopsManager.tsx | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/frontend/src/stopsManager.tsx b/frontend/src/stopsManager.tsx index 2d36b3f..4d3c6b7 100644 --- a/frontend/src/stopsManager.tsx +++ b/frontend/src/stopsManager.tsx @@ -205,25 +205,19 @@ export const StopsManager: VoidComponent = () => { - {() => { - const items = []; - for (const stop of foundStops().sort((x, y) => x.name.localeCompare(y.name))) { - items.push( - - - ); + x.name.localeCompare(y.name))}> + {(stop) => + + + } - return items; - }} +