From 261b380818fbbb824d399dbeb997a1cbd41df9da Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Mon, 7 Mar 2022 12:32:51 -0300 Subject: [PATCH] Chore: Migrate REST API - usersAutoComplete to Typescript (#3845) --- app/views/ForwardLivechatView.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/views/ForwardLivechatView.tsx b/app/views/ForwardLivechatView.tsx index 21c99a0f6..178e0767a 100644 --- a/app/views/ForwardLivechatView.tsx +++ b/app/views/ForwardLivechatView.tsx @@ -20,10 +20,6 @@ const styles = StyleSheet.create({ padding: 16 } }); -interface IUser { - username: string; - _id: string; -} interface IParsedData { label: string; @@ -47,7 +43,7 @@ const ForwardLivechatView = ({ navigation, route, theme }: IBaseScreen ({ + const parsedDepartments = result.departments.map(department => ({ label: department.name, value: department._id })); @@ -71,7 +67,7 @@ const ForwardLivechatView = ({ navigation, route, theme }: IBaseScreen ({ label: user.username, value: user._id })); + const parsedUsers = result.items.map(user => ({ label: user.username, value: user._id })); if (!term) { setUsers(parsedUsers); }