From 2ffcad0981cb2cb732f8640af91307a93c1c147d Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 21 Mar 2018 16:00:50 +0000 Subject: [PATCH] Convert GeminiScrollbarWrapper to stateless component --- .../views/elements/GeminiScrollbarWrapper.js | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/components/views/elements/GeminiScrollbarWrapper.js b/src/components/views/elements/GeminiScrollbarWrapper.js index c56ff67c9c..445b1a2596 100644 --- a/src/components/views/elements/GeminiScrollbarWrapper.js +++ b/src/components/views/elements/GeminiScrollbarWrapper.js @@ -14,23 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import GeminiScrollbar from 'react-gemini-scrollbar'; -class GeminiScrollbarWrapper extends React.Component { - render() { - // Enable forceGemini so that gemini is always enabled. This is - // to avoid future issues where a feature is implemented without - // doing QA on every OS/browser combination. - // - // By default GeminiScrollbar allows native scrollbars to be used - // on macOS. Use forceGemini to enable Gemini's non-native - // scrollbars on all OSs. - return - { this.props.children } - ; - } +function GeminiScrollbarWrapper(props) { + // Enable forceGemini so that gemini is always enabled. This is + // to avoid future issues where a feature is implemented without + // doing QA on every OS/browser combination. + // + // By default GeminiScrollbar allows native scrollbars to be used + // on macOS. Use forceGemini to enable Gemini's non-native + // scrollbars on all OSs. + return + { props.children } + ; } - export default GeminiScrollbarWrapper;