From 53eb251476f76afa460f7e4ede6e9409b6e1445e Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Fri, 8 Apr 2022 23:43:31 -0300 Subject: [PATCH] Chore: Evaluate UserItem - TypeScript (#3983) * Chore: Evaluate UserItem - TypeScript * fix storyshot * minor tweaks * tweaks on comments * fix storyshot * move useritem from presentation to containers * remove comments --- app/{presentation => containers}/UserItem.tsx | 3 +-- app/views/CreateChannelView.tsx | 2 +- app/views/NewMessageView.tsx | 2 +- app/views/RoomMembersView/index.tsx | 2 +- app/views/SelectedUsersView.tsx | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) rename app/{presentation => containers}/UserItem.tsx (97%) diff --git a/app/presentation/UserItem.tsx b/app/containers/UserItem.tsx similarity index 97% rename from app/presentation/UserItem.tsx rename to app/containers/UserItem.tsx index 0c2a456c0..2c5bb0af5 100644 --- a/app/presentation/UserItem.tsx +++ b/app/containers/UserItem.tsx @@ -1,8 +1,7 @@ import React from 'react'; -// @ts-ignore import { Pressable, StyleProp, StyleSheet, Text, View, ViewStyle } from 'react-native'; -import Avatar from '../containers/Avatar'; +import Avatar from './Avatar'; import { CustomIcon } from '../lib/Icons'; import sharedStyles from '../views/Styles'; import { themes } from '../lib/constants'; diff --git a/app/views/CreateChannelView.tsx b/app/views/CreateChannelView.tsx index 17b0f533d..c99ec91fe 100644 --- a/app/views/CreateChannelView.tsx +++ b/app/views/CreateChannelView.tsx @@ -11,7 +11,7 @@ import { removeUser } from '../actions/selectedUsers'; import KeyboardView from '../presentation/KeyboardView'; import scrollPersistTaps from '../utils/scrollPersistTaps'; import I18n from '../i18n'; -import UserItem from '../presentation/UserItem'; +import UserItem from '../containers/UserItem'; import * as HeaderButton from '../containers/HeaderButton'; import StatusBar from '../containers/StatusBar'; import { SWITCH_TRACK_COLOR, themes } from '../lib/constants'; diff --git a/app/views/NewMessageView.tsx b/app/views/NewMessageView.tsx index 0304b7007..2cbd11ddb 100644 --- a/app/views/NewMessageView.tsx +++ b/app/views/NewMessageView.tsx @@ -19,7 +19,7 @@ import { CustomIcon } from '../lib/Icons'; import Navigation from '../lib/navigation/appNavigation'; import { compareServerVersion } from '../lib/methods/helpers/compareServerVersion'; import RocketChat from '../lib/rocketchat'; -import UserItem from '../presentation/UserItem'; +import UserItem from '../containers/UserItem'; import { withTheme } from '../theme'; import { goRoom } from '../utils/goRoom'; import log, { events, logEvent } from '../utils/log'; diff --git a/app/views/RoomMembersView/index.tsx b/app/views/RoomMembersView/index.tsx index 61a2be851..4a9dfa24c 100644 --- a/app/views/RoomMembersView/index.tsx +++ b/app/views/RoomMembersView/index.tsx @@ -19,7 +19,7 @@ import database from '../../lib/database'; import { CustomIcon } from '../../lib/Icons'; import protectedFunction from '../../lib/methods/helpers/protectedFunction'; import RocketChat from '../../lib/rocketchat'; -import UserItem from '../../presentation/UserItem'; +import UserItem from '../../containers/UserItem'; import { getUserSelector } from '../../selectors/login'; import { ModalStackParamList } from '../../stacks/MasterDetailStack/types'; import { withTheme } from '../../theme'; diff --git a/app/views/SelectedUsersView.tsx b/app/views/SelectedUsersView.tsx index 5b9b3810f..d0c29a509 100644 --- a/app/views/SelectedUsersView.tsx +++ b/app/views/SelectedUsersView.tsx @@ -17,7 +17,7 @@ import { IApplicationState, IBaseScreen, ISubscription, IUser } from '../definit import I18n from '../i18n'; import database from '../lib/database'; import RocketChat from '../lib/rocketchat'; -import UserItem from '../presentation/UserItem'; +import UserItem from '../containers/UserItem'; import { ISelectedUser } from '../reducers/selectedUsers'; import { getUserSelector } from '../selectors/login'; import { ChatsStackParamList } from '../stacks/types';