From b0c45bad902af8951ecf7ed5c6af92d53b454489 Mon Sep 17 00:00:00 2001 From: GleidsonDaniel Date: Tue, 18 Jan 2022 12:04:40 -0300 Subject: [PATCH] chore: fix types and apply IAplicationState to types --- app/containers/RoomHeader/index.tsx | 9 +++++---- app/reducers/activeUsers.ts | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/containers/RoomHeader/index.tsx b/app/containers/RoomHeader/index.tsx index fb00bc10..4c21ecba 100644 --- a/app/containers/RoomHeader/index.tsx +++ b/app/containers/RoomHeader/index.tsx @@ -1,10 +1,11 @@ +import { dequal } from 'dequal'; import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { dequal } from 'dequal'; -import RoomHeader from './RoomHeader'; +import { IApplicationState } from '../../definitions'; import { withDimensions } from '../../dimensions'; import I18n from '../../i18n'; +import RoomHeader from './RoomHeader'; interface IRoomHeaderContainerProps { title: string; @@ -122,8 +123,8 @@ class RoomHeaderContainer extends Component { } } -const mapStateToProps = (state: any, ownProps: any) => { - let statusText; +const mapStateToProps = (state: IApplicationState, ownProps: any) => { + let statusText = ''; let status = 'offline'; const { roomUserId, type, visitor = {}, tmid } = ownProps; diff --git a/app/reducers/activeUsers.ts b/app/reducers/activeUsers.ts index 9877a5ce..1c32a13f 100644 --- a/app/reducers/activeUsers.ts +++ b/app/reducers/activeUsers.ts @@ -4,7 +4,7 @@ import { SET_ACTIVE_USERS } from '../actions/actionsTypes'; type TUserStatus = 'online' | 'offline'; export interface IActiveUser { status: TUserStatus; - statusText?: string; + statusText: string; } export interface IActiveUsers {