From f04b15a432515829f88df7c20f2475bb0f667fab Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Mon, 2 May 2022 09:03:55 -0300 Subject: [PATCH] Chore: Evaluate ForwardLivechatView - TypeScript (#4126) * Chore: Evaluate ForwardLivechatView - TypeScript * minor tweaks --- app/stacks/InsideStack.tsx | 6 +----- app/stacks/MasterDetailStack/index.tsx | 6 +----- app/views/ForwardLivechatView.tsx | 12 ++++++------ 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/app/stacks/InsideStack.tsx b/app/stacks/InsideStack.tsx index 6c6c0249..aef07c76 100644 --- a/app/stacks/InsideStack.tsx +++ b/app/stacks/InsideStack.tsx @@ -115,11 +115,7 @@ const ChatsStackNavigator = () => { component={NotificationPrefView} options={NotificationPrefView.navigationOptions} /> - + { component={NotificationPrefView} options={NotificationPrefView.navigationOptions} /> - + diff --git a/app/views/ForwardLivechatView.tsx b/app/views/ForwardLivechatView.tsx index bd83b71a..74103d5d 100644 --- a/app/views/ForwardLivechatView.tsx +++ b/app/views/ForwardLivechatView.tsx @@ -4,13 +4,12 @@ import { StyleSheet, View } from 'react-native'; import { useDispatch } from 'react-redux'; import { forwardRoom, ITransferData } from '../actions/room'; -import { themes } from '../lib/constants'; import OrSeparator from '../containers/OrSeparator'; import Input from '../containers/UIKit/MultiSelect/Input'; import { IBaseScreen, IServerRoom } from '../definitions'; import I18n from '../i18n'; import { ChatsStackParamList } from '../stacks/types'; -import { withTheme } from '../theme'; +import { useTheme } from '../theme'; import { IOptionsField } from './NotificationPreferencesView/options'; import { Services } from '../lib/services'; @@ -28,14 +27,15 @@ interface IParsedData { const COUNT_DEPARTMENT = 50; -const ForwardLivechatView = ({ navigation, route, theme }: IBaseScreen) => { +const ForwardLivechatView = ({ navigation, route }: IBaseScreen) => { const [departments, setDepartments] = useState([]); const [departmentId, setDepartment] = useState(''); const [departmentTotal, setDepartmentTotal] = useState(0); const [users, setUsers] = useState([]); const [userId, setUser] = useState(); - const [room, setRoom] = useState({} as IServerRoom); + const [room, setRoom] = useState({} as IServerRoom); const dispatch = useDispatch(); + const { theme, colors } = useTheme(); const rid = route.params?.rid; @@ -149,7 +149,7 @@ const ForwardLivechatView = ({ navigation, route, theme }: IBaseScreen + @@ -157,4 +157,4 @@ const ForwardLivechatView = ({ navigation, route, theme }: IBaseScreen