chore: fix types and apply IAplicationState to types

This commit is contained in:
GleidsonDaniel 2022-01-18 12:04:40 -03:00
parent 8fb35945d6
commit b0c45bad90
2 changed files with 6 additions and 5 deletions

View File

@ -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<IRoomHeaderContainerProps, any> {
}
}
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;

View File

@ -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 {