[IMPROVE] - fixing some errors appoint by jest

This commit is contained in:
AlexAlexandre 2021-08-04 16:19:08 -03:00
parent 1596f1621f
commit 078c361efc
5 changed files with 6 additions and 8 deletions

View File

@ -6,7 +6,7 @@ import { settings as RocketChatSettings } from '@rocket.chat/sdk';
import { avatarURL } from '../../utils/avatar';
import Emoji from '../markdown/Emoji';
import {IAvatar} from "./interfaces";
import {IAvatar} from './interfaces';
const Avatar = React.memo(({
server,
@ -23,7 +23,7 @@ const Avatar = React.memo(({
rid,
blockUnauthenticatedAccess,
serverVersion,
text = '',
text,
size = 25,
borderRadius = 4,
type = 'd',

View File

@ -7,7 +7,7 @@ import CustomEmoji from './CustomEmoji';
import scrollPersistTaps from '../../utils/scrollPersistTaps';
import {IEmoji, IEmojiCategory} from "./interfaces";
const EMOJI_SIZE: number = 50;
const EMOJI_SIZE = 50;
const renderEmoji = (emoji: IEmoji, size: number, baseUrl: string) => {
if (emoji && emoji.isCustom) {

View File

@ -25,7 +25,6 @@ const scrollProps = {
};
interface IEmojiPickerProps {
literal: string;
isMessageContainsOnlyEmoji: boolean;
getCustomEmoji?: Function;
baseUrl: string;

View File

@ -76,9 +76,9 @@ interface IRoomHeader {
const SubTitle = React.memo(({ usersTyping, subtitle, renderFunc, theme, scale }: TRoomHeaderSubTitle) => {
const fontSize = getSubTitleSize(scale);
// typing
if (usersTyping?.length) {
if (usersTyping.length) {
let usersText;
if (usersTyping?.length === 2) {
if (usersTyping.length === 2) {
usersText = usersTyping.join(` ${ I18n.t('and') } `);
} else {
usersText = usersTyping.join(', ');
@ -147,7 +147,7 @@ const Header = React.memo(({
let scale = 1;
if (!portrait && !tmid) {
if (usersTyping?.length > 0 || subtitle) {
if (usersTyping.length > 0 || subtitle) {
scale = 0.8;
}
}

View File

@ -7,7 +7,6 @@ import { themes } from '../../constants/colors';
import styles from './styles';
// TODO this interface it's duplicated with 'app/containers/EmojiPicker/index.tsx'
interface IEmoji {
literal: string;
isMessageContainsOnlyEmoji: boolean;