From 707a62263e378dd93fa7060dee3bb7b66035d99f Mon Sep 17 00:00:00 2001 From: Jean Brito Date: Tue, 7 Jun 2022 17:14:43 -0300 Subject: [PATCH] chore: Convert to TS RoomAutoComplete (#25536) Co-authored-by: Guilherme Gazzo --- apps/meteor/client/components/RoomAutoComplete/Avatar.tsx | 8 ++++---- .../components/RoomAutoComplete/RoomAutoComplete.tsx | 2 +- apps/meteor/client/components/avatar/RoomAvatar.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/meteor/client/components/RoomAutoComplete/Avatar.tsx b/apps/meteor/client/components/RoomAutoComplete/Avatar.tsx index d90fa71772b4..49041e23d821 100644 --- a/apps/meteor/client/components/RoomAutoComplete/Avatar.tsx +++ b/apps/meteor/client/components/RoomAutoComplete/Avatar.tsx @@ -1,16 +1,16 @@ import { Options } from '@rocket.chat/fuselage'; -import React, { ReactElement } from 'react'; +import React, { FC } from 'react'; import RoomAvatar from '../avatar/RoomAvatar'; type AvatarProps = { value: string; type: string; - avatarETag?: string | undefined; + avatarETag?: string; }; -const Avatar = ({ value, type, avatarETag, ...props }: AvatarProps): ReactElement => ( - +const Avatar: FC = ({ value, type, avatarETag, ...props }) => ( + ); export default Avatar; diff --git a/apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx b/apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx index 731d3a724cb5..4cf8077e9853 100644 --- a/apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx +++ b/apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx @@ -1,5 +1,5 @@ import { AutoComplete, Option, Box } from '@rocket.chat/fuselage'; -import React, { ComponentProps, memo, ReactElement, useMemo, useState } from 'react'; +import React, { memo, useMemo, useState, ReactElement, ComponentProps } from 'react'; import { useEndpointData } from '../../hooks/useEndpointData'; import RoomAvatar from '../avatar/RoomAvatar'; diff --git a/apps/meteor/client/components/avatar/RoomAvatar.tsx b/apps/meteor/client/components/avatar/RoomAvatar.tsx index 0c4a1105a721..750776a00b5a 100644 --- a/apps/meteor/client/components/avatar/RoomAvatar.tsx +++ b/apps/meteor/client/components/avatar/RoomAvatar.tsx @@ -14,7 +14,7 @@ type RoomAvatarProps = { room: { _id: string; type?: string; - t: string; + t?: string; avatarETag?: string; }; };