From 28b1a56986d3f4979d0766dc6fe4da85ea238f2e Mon Sep 17 00:00:00 2001 From: nklhrstv Date: Wed, 25 Mar 2020 15:41:39 +0200 Subject: [PATCH] use general section as initially selected --- src/routes/Settings/Settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/Settings/Settings.js b/src/routes/Settings/Settings.js index dd372ceea..3892f5532 100644 --- a/src/routes/Settings/Settings.js +++ b/src/routes/Settings/Settings.js @@ -72,7 +72,7 @@ const Settings = () => { { ref: playerSectionRef, id: PLAYER_SECTION }, { ref: streamingServerSectionRef, id: STREAMING_SECTION }, ]), []); - const [selectedSectionId, setSelectedSectionId] = React.useState(sections[0].id); + const [selectedSectionId, setSelectedSectionId] = React.useState(GENERAL_SECTION); const updateSelectedSectionId = React.useCallback(() => { if (sectionsContainerRef.current.scrollTop + sectionsContainerRef.current.clientHeight === sectionsContainerRef.current.scrollHeight) { setSelectedSectionId(sections[sections.length - 1].id);