From ada6a1084a93a634b3040a3e8eb88e3e88dff0fd Mon Sep 17 00:00:00 2001 From: Viktoryia Kliushun Date: Mon, 27 Nov 2023 14:05:08 +0100 Subject: [PATCH 1/2] [TS migration] Migrate 'TaskHeaderActionButton.js' component --- src/components/TaskHeaderActionButton.js | 60 ----------------------- src/components/TaskHeaderActionButton.tsx | 46 +++++++++++++++++ 2 files changed, 46 insertions(+), 60 deletions(-) delete mode 100644 src/components/TaskHeaderActionButton.js create mode 100644 src/components/TaskHeaderActionButton.tsx diff --git a/src/components/TaskHeaderActionButton.js b/src/components/TaskHeaderActionButton.js deleted file mode 100644 index 09ca427b8e56..000000000000 --- a/src/components/TaskHeaderActionButton.js +++ /dev/null @@ -1,60 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import {View} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; -import compose from '@libs/compose'; -import * as ReportUtils from '@libs/ReportUtils'; -import reportPropTypes from '@pages/reportPropTypes'; -import useThemeStyles from '@styles/useThemeStyles'; -import * as Session from '@userActions/Session'; -import * as Task from '@userActions/Task'; -import ONYXKEYS from '@src/ONYXKEYS'; -import Button from './Button'; -import withLocalize, {withLocalizePropTypes} from './withLocalize'; - -const propTypes = { - /** The report currently being looked at */ - report: reportPropTypes.isRequired, - - /** Current user session */ - session: PropTypes.shape({ - accountID: PropTypes.number, - }), - - ...withLocalizePropTypes, -}; - -const defaultProps = { - session: { - accountID: 0, - }, -}; - -function TaskHeaderActionButton(props) { - const styles = useThemeStyles(); - return ( - -