From 92690bf81fc45a444674791a505ba1ec85a78388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Ta=C5=84czyk?= Date: Wed, 13 Apr 2022 13:03:52 +0200 Subject: [PATCH] Fix the condition for rocket take off It should start after 5 seconds, and do not come back. --- .../routes/LaunchPad/components/Rocket/components/RocketCore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocket-ship/src/routes/LaunchPad/components/Rocket/components/RocketCore.js b/rocket-ship/src/routes/LaunchPad/components/Rocket/components/RocketCore.js index 23032e213..8ac05639c 100644 --- a/rocket-ship/src/routes/LaunchPad/components/Rocket/components/RocketCore.js +++ b/rocket-ship/src/routes/LaunchPad/components/Rocket/components/RocketCore.js @@ -9,7 +9,7 @@ function timeToPositionPercent(startTime) { const now = Date.now(); const timeDiff = now - startTime; - if (timeDiff >= MS_TO_TAKEOFF) { return FINAL_POSITION_BOTTOM_VAL; } + if (timeDiff <= MS_TO_TAKEOFF) { return FINAL_POSITION_BOTTOM_VAL; } return `calc(300px + ${((timeDiff / MS_TO_TAKEOFF) * 100).toFixed(0)}%)`; }