Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Convert to TS RoomAutoComplete #25536

Merged
merged 4 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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