|
1 | 1 | import * as React from 'react'; |
2 | 2 | import { |
3 | | - DialogType, |
4 | | - FontWeights, |
5 | | - getTheme, |
6 | | - IButtonStyles, |
7 | 3 | IconButton, |
8 | 4 | IIconProps, |
9 | | - IStackProps, |
10 | | - mergeStyleSets, |
11 | 5 | Modal, |
12 | 6 | Persona, |
13 | 7 | PersonaSize, |
14 | 8 | Stack, |
15 | 9 | } from '@fluentui/react'; |
16 | | -import { AppContext } from '../../common'; |
17 | 10 | import { useListItemCommentsStyles } from './useListItemCommentsStyles'; |
18 | 11 |
|
19 | 12 | interface ILikedUserListProps { |
20 | 13 | isDialogOpen: boolean; |
21 | 14 | setShowDialog: React.Dispatch<React.SetStateAction<boolean>>; |
22 | | - likedBy: any; |
| 15 | + likedBy: any; // eslint-disable-line @typescript-eslint/no-explicit-any |
23 | 16 | } |
24 | 17 |
|
| 18 | +const cancelIcon: IIconProps = { iconName: 'Cancel' }; |
| 19 | + |
25 | 20 | export const LikedUserList = ({ |
26 | 21 | isDialogOpen, |
27 | 22 | setShowDialog, |
28 | 23 | likedBy, |
29 | | -}: ILikedUserListProps) => { |
| 24 | +}: ILikedUserListProps): JSX.Element => { |
30 | 25 | const { iconButtonStyles, contentStyles } = useListItemCommentsStyles(); |
31 | 26 |
|
32 | 27 | const PHOTO_URL = '/_layouts/15/userphoto.aspx?size=M&accountname='; |
@@ -55,19 +50,23 @@ export const LikedUserList = ({ |
55 | 50 | padding: '0 1.5rem 1.5rem 1.5rem', |
56 | 51 | }} |
57 | 52 | > |
58 | | - {likedBy.map((user: any, index: number) => ( |
59 | | - <> |
60 | | - <Persona |
61 | | - key={index} |
62 | | - text={user.name} |
63 | | - secondaryText={user.email} |
64 | | - size={PersonaSize.size40} |
65 | | - imageUrl={`${PHOTO_URL}${user.email}`} |
66 | | - /> |
67 | | - </> |
68 | | - ))} |
| 53 | + {likedBy.map( |
| 54 | + ( |
| 55 | + user: any, // eslint-disable-line @typescript-eslint/no-explicit-any |
| 56 | + index: number |
| 57 | + ) => ( |
| 58 | + <> |
| 59 | + <Persona |
| 60 | + key={index} |
| 61 | + text={user.name} |
| 62 | + secondaryText={user.email} |
| 63 | + size={PersonaSize.size40} |
| 64 | + imageUrl={`${PHOTO_URL}${user.email}`} |
| 65 | + /> |
| 66 | + </> |
| 67 | + ) |
| 68 | + )} |
69 | 69 | </Stack> |
70 | 70 | </Modal> |
71 | 71 | ); |
72 | 72 | }; |
73 | | -const cancelIcon: IIconProps = { iconName: 'Cancel' }; |
0 commit comments