From e8a3026c433cc3404566c463c3ecbe6686484d90 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Fri, 17 Dec 2021 16:03:45 -0600 Subject: [PATCH] settings: convert SettingsButton to function --- src/settings/SettingsButton.tsx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/settings/SettingsButton.tsx b/src/settings/SettingsButton.tsx index 7afb645c..56eee78b 100644 --- a/src/settings/SettingsButton.tsx +++ b/src/settings/SettingsButton.tsx @@ -1,23 +1,15 @@ // SPDX-License-Identifier: MIT // Copyright (c) 2021 The Pybricks Authors -import { connect } from 'react-redux'; +import React from 'react'; import ActionButton, { ActionButtonProps } from '../toolbar/ActionButton'; import { TooltipId } from '../toolbar/i18n'; import settingsIcon from './settings.svg'; -type StateProps = undefined; -type DispatchProps = undefined; -type OwnProps = Pick; +type SettingsButtonProps = Pick; -const mergeProps = ( - _stateProps: StateProps, - _dispatchProps: DispatchProps, - ownProps: OwnProps, -): ActionButtonProps => ({ - tooltip: TooltipId.Settings, - icon: settingsIcon, - ...ownProps, -}); +const SettingsButton: React.FunctionComponent = (props) => { + return ; +}; -export default connect(undefined, undefined, mergeProps)(ActionButton); +export default SettingsButton;