1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00

Use suggestions from PR review.

This commit is contained in:
Thomas Heartman 2025-10-23 09:28:29 +02:00
parent a9392e134f
commit 138c2a54d9
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78
2 changed files with 6 additions and 10 deletions

View File

@ -2,11 +2,9 @@ import { TextCell } from 'component/common/Table/cells/TextCell/TextCell';
import { styled, Typography } from '@mui/material';
import { useSearchHighlightContext } from 'component/common/Table/SearchHighlightContext/SearchHighlightContext';
import { Highlighter } from 'component/common/Highlighter/Highlighter';
import {
type AvatarUser,
UserAvatar,
} from 'component/common/UserAvatar/UserAvatar';
import { UserAvatar } from 'component/common/UserAvatar/UserAvatar';
import { Truncator } from 'component/common/Truncator/Truncator';
import type { ComponentProps } from 'react';
const StyledContainer = styled('div')(({ theme }) => ({
display: 'flex',
@ -17,7 +15,7 @@ const StyledContainer = styled('div')(({ theme }) => ({
}));
type AvatarCellProps = {
value: AvatarUser;
value: ComponentProps<typeof UserAvatar>['user'];
};
export const AvatarCell = ({ value }: AvatarCellProps) => {

View File

@ -37,12 +37,10 @@ const StyledTooltipContent = styled(Box)({
justifyContent: 'center',
});
export type AvatarUser = Partial<
Pick<IUser, 'id' | 'name' | 'email' | 'username' | 'imageUrl'>
>;
export interface IUserAvatarProps extends AvatarProps {
user?: AvatarUser;
user?: Partial<
Pick<IUser, 'id' | 'name' | 'email' | 'username' | 'imageUrl'>
>;
src?: string;
className?: string;
sx?: SxProps<Theme>;