From a22b043af9695e1ba7aedf386b74d30b9dbdeda3 Mon Sep 17 00:00:00 2001 From: goodmice Date: Mon, 12 Sep 2022 12:30:07 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD=20?= =?UTF-8?q?=D0=B2=D0=B8=D0=B4=20UserView?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/views/UserView.tsx | 73 +++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-) diff --git a/src/components/views/UserView.tsx b/src/components/views/UserView.tsx index 51156f4..fbfeffe 100755 --- a/src/components/views/UserView.tsx +++ b/src/components/views/UserView.tsx @@ -1,4 +1,4 @@ -import { memo } from 'react' +import { HTMLProps, memo } from 'react' import { Tooltip } from 'antd' import { UserOutlined } from '@ant-design/icons' @@ -6,33 +6,58 @@ import { UserDto } from '@api' import { Grid, GridItem } from '@components/Grid' import { CompanyView } from './CompanyView' -export type UserViewProps = { - user?: UserDto +export type UserViewProps = HTMLProps & { + user?: UserDto } -export const UserView = memo(({ user }) => user ? ( - - Фамилия: - {user?.surname} +export const UserView = memo(({ user, ...other }) => + user ? ( + + + Фамилия: + + + {user?.surname} + - Имя: - {user?.name} + + Имя: + + + {user?.name} + - Отчество: - {user?.patronymic} + + Отчество: + + + {user?.patronymic} + - Компания: - - - - - )}> - - {user?.login} - -) : ( - - -)) + + Компания: + + + + + + } + > + + + {user?.login} + + + ) : ( + + + + --- + + + ) +) export default UserView