Skip to content

Commit

Permalink
chore: Convert to TS RoomAutoComplete (#25536)
Browse files Browse the repository at this point in the history
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
  • Loading branch information
jeanfbrito and ggazzo authored Jun 7, 2022
1 parent 150c6b4 commit 707a622
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions apps/meteor/client/components/RoomAutoComplete/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -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 => (
<RoomAvatar size={Options.AvatarSize} room={{ t: type, type, _id: value, avatarETag }} {...props} />
const Avatar: FC<AvatarProps> = ({ value, type, avatarETag, ...props }) => (
<RoomAvatar size={Options.AvatarSize} room={{ type, _id: value, avatarETag }} {...props} />
);

export default Avatar;
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/client/components/avatar/RoomAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type RoomAvatarProps = {
room: {
_id: string;
type?: string;
t: string;
t?: string;
avatarETag?: string;
};
};
Expand Down

0 comments on commit 707a622

Please sign in to comment.