From 79be5d5a22d6f6e9b5ce479ef3d408b7bc2315a5 Mon Sep 17 00:00:00 2001 From: Shreya Date: Wed, 21 Jul 2021 16:47:34 +0530 Subject: [PATCH] cc: Set island mode in `Main.tsx`'s constructor `Main.tsx`'s `updateStatus()` was being called every 10 seconds, which meant that `islandMode` was updated every 10 seconds. If you were on the configuration page, and you refreshed the page at the right moment (as soon as/just before `updateStatus()` was being called), the config tabs showed were correct according to the mode. If you refreshed at the wrong moment, you would get the default tabs i.e. the tabs shown for the advanced mode (see `ConfigurePage.js`'s `getSectionsOrder()`). --- monkey/monkey_island/cc/ui/src/components/Main.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/monkey/monkey_island/cc/ui/src/components/Main.tsx b/monkey/monkey_island/cc/ui/src/components/Main.tsx index 5216245d7..23b126cae 100644 --- a/monkey/monkey_island/cc/ui/src/components/Main.tsx +++ b/monkey/monkey_island/cc/ui/src/components/Main.tsx @@ -70,6 +70,7 @@ class AppComponent extends AuthComponent { noAuthLoginAttempted: undefined }; this.interval = undefined; + this.setMode(); } updateStatus = () => {