TypeIcon.tsx 669 Bytes
Newer Older
Diego Mello's avatar
Diego Mello committed
1
2
import React from 'react';

Diego Mello's avatar
Diego Mello committed
3
import { TUserStatus, IOmnichannelSource } from '../../definitions';
Diego Mello's avatar
Diego Mello committed
4
5
6
7
import RoomTypeIcon from '../../containers/RoomTypeIcon';

interface ITypeIcon {
	type: string;
Diego Mello's avatar
Diego Mello committed
8
	status: TUserStatus;
Diego Mello's avatar
Diego Mello committed
9
10
11
	prid: string;
	isGroupChat: boolean;
	teamMain: boolean;
Diego Mello's avatar
Diego Mello committed
12
13
	size?: number;
	style?: object;
Diego Mello's avatar
Diego Mello committed
14
	sourceType?: IOmnichannelSource;
Diego Mello's avatar
Diego Mello committed
15
16
}

Diego Mello's avatar
Diego Mello committed
17
const TypeIcon = React.memo(({ type, prid, status, isGroupChat, teamMain, size, style, sourceType }: ITypeIcon) => (
Diego Mello's avatar
Diego Mello committed
18
19
20
21
22
23
24
	<RoomTypeIcon
		type={prid ? 'discussion' : type}
		isGroupChat={isGroupChat}
		status={status}
		teamMain={teamMain}
		size={size}
		style={style}
Diego Mello's avatar
Diego Mello committed
25
		sourceType={sourceType}
Diego Mello's avatar
Diego Mello committed
26
	/>
Diego Mello's avatar
Diego Mello committed
27
28
29
));

export default TypeIcon;