From e6b614c6f27777e742b96f0d1ac28695147130cb Mon Sep 17 00:00:00 2001 From: grafixeyehero <32230989+grafixeyehero@users.noreply.github.com> Date: Sat, 23 Oct 2021 18:11:05 +0300 Subject: [PATCH] apply suggestions --- src/components/dashboard/users/InputElement.tsx | 4 ++-- src/components/pages/NewUserPage.tsx | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/dashboard/users/InputElement.tsx b/src/components/dashboard/users/InputElement.tsx index 5ece3ac0b4..ffcc434191 100644 --- a/src/components/dashboard/users/InputElement.tsx +++ b/src/components/dashboard/users/InputElement.tsx @@ -18,14 +18,14 @@ type IProps = { options?: string } -const InputElement: FunctionComponent = ({ type, id, label, ...rest }: IProps) => { +const InputElement: FunctionComponent = ({ type, id, label, options }: IProps) => { return (
); diff --git a/src/components/pages/NewUserPage.tsx b/src/components/pages/NewUserPage.tsx index 8e65d46fe2..604a600409 100644 --- a/src/components/pages/NewUserPage.tsx +++ b/src/components/pages/NewUserPage.tsx @@ -45,16 +45,13 @@ const NewUserPage: FunctionComponent = () => { loadUser(); - const getItemsResult = items => { - const itemsArr: ItemsArr[] = []; - - for (const item of items) { - itemsArr.push({ + const getItemsResult = (items: ItemsArr[]) => { + return items.map(item => + ({ Id: item.Id, Name: item.Name - }); - } - return itemsArr; + }) + ); }; const loadMediaFolders = (result) => {