antonio-mello-ai commented on PR #62831:
URL: https://github.com/apache/airflow/pull/62831#issuecomment-4013170067

   Thanks @pierrejeambrun — both points addressed:
   
   1. **`usedSlots` moved out of the loop** — it's now computed once before the 
JSX return, as a constant derived from `displayedSlots`.
   
   2. **Reuses filtered data** — extracted `const displayedSlots = 
preparedSlots.filter(...)` and then `usedSlots` is computed from 
`displayedSlots.filter(s => s.slotType !== "open")` instead of re-filtering 
`preparedSlots` from scratch. The `.map()` now iterates `displayedSlots` 
directly.
   
   No logic changes — just cleaner data flow.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to