From 8579f77ed13ef4b3d7e5e0a9c2235e0eaafae34f Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Wed, 20 Mar 2024 17:37:37 +0800 Subject: [PATCH] fix: use UserInfo type --- .../src/components/ItemPreview/UserPreview.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/console/src/components/ItemPreview/UserPreview.tsx b/packages/console/src/components/ItemPreview/UserPreview.tsx index fb485bb43c4..357e74fb0ed 100644 --- a/packages/console/src/components/ItemPreview/UserPreview.tsx +++ b/packages/console/src/components/ItemPreview/UserPreview.tsx @@ -1,4 +1,4 @@ -import { type User } from '@logto/schemas'; +import { type UserInfo } from '@logto/schemas'; import { conditional } from '@silverhand/essentials'; import SuspendedTag from '@/pages/Users/components/SuspendedTag'; @@ -13,13 +13,13 @@ type Props = { * A subset of User schema type that is used in the preview component. */ user: { - id: User['id']; - avatar?: User['avatar']; - name?: User['name']; - primaryEmail?: User['primaryEmail']; - primaryPhone?: User['primaryPhone']; - username?: User['username']; - isSuspended?: User['isSuspended']; + id: UserInfo['id']; + avatar?: UserInfo['avatar']; + name?: UserInfo['name']; + primaryEmail?: UserInfo['primaryEmail']; + primaryPhone?: UserInfo['primaryPhone']; + username?: UserInfo['username']; + isSuspended?: UserInfo['isSuspended']; }; /** * Whether to provide a link to user details page. Explicitly set to `false` to hide it.