chore: fix types and apply IAplicationState to types
This commit is contained in:
parent
8fb35945d6
commit
b0c45bad90
|
@ -1,10 +1,11 @@
|
||||||
|
import { dequal } from 'dequal';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { dequal } from 'dequal';
|
|
||||||
|
|
||||||
import RoomHeader from './RoomHeader';
|
import { IApplicationState } from '../../definitions';
|
||||||
import { withDimensions } from '../../dimensions';
|
import { withDimensions } from '../../dimensions';
|
||||||
import I18n from '../../i18n';
|
import I18n from '../../i18n';
|
||||||
|
import RoomHeader from './RoomHeader';
|
||||||
|
|
||||||
interface IRoomHeaderContainerProps {
|
interface IRoomHeaderContainerProps {
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -122,8 +123,8 @@ class RoomHeaderContainer extends Component<IRoomHeaderContainerProps, any> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = (state: any, ownProps: any) => {
|
const mapStateToProps = (state: IApplicationState, ownProps: any) => {
|
||||||
let statusText;
|
let statusText = '';
|
||||||
let status = 'offline';
|
let status = 'offline';
|
||||||
const { roomUserId, type, visitor = {}, tmid } = ownProps;
|
const { roomUserId, type, visitor = {}, tmid } = ownProps;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { SET_ACTIVE_USERS } from '../actions/actionsTypes';
|
||||||
type TUserStatus = 'online' | 'offline';
|
type TUserStatus = 'online' | 'offline';
|
||||||
export interface IActiveUser {
|
export interface IActiveUser {
|
||||||
status: TUserStatus;
|
status: TUserStatus;
|
||||||
statusText?: string;
|
statusText: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IActiveUsers {
|
export interface IActiveUsers {
|
||||||
|
|
Loading…
Reference in New Issue