move E2E_STATE to E2EIcon to simplify imports

This commit is contained in:
Michael Telatynski 2020-01-22 16:54:31 +00:00
parent 2e0977fb0c
commit 9706114bb5
2 changed files with 14 additions and 12 deletions

View file

@ -14,22 +14,30 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from "react";
import classNames from 'classnames';
import { _t } from '../../../languageHandler';
import AccessibleButton from '../elements/AccessibleButton';
import SettingsStore from '../../../settings/SettingsStore';
export const E2E_STATE = {
VERIFIED: "verified",
WARNING: "warning",
UNKNOWN: "unknown",
NORMAL: "normal",
};
export default function(props) {
const { isUser } = props;
const isNormal = props.status === "normal";
const isWarning = props.status === "warning";
const isVerified = props.status === "verified";
const { isUser, status, className } = props;
const isNormal = status === E2E_STATE.NORMAL;
const isWarning = status === E2E_STATE.WARNING;
const isVerified = status === E2E_STATE.VERIFIED;
const e2eIconClasses = classNames({
mx_E2EIcon: true,
mx_E2EIcon_warning: isWarning,
mx_E2EIcon_normal: isNormal,
mx_E2EIcon_verified: isVerified,
}, props.className);
}, className);
let e2eTitle;
const crossSigning = SettingsStore.isFeatureEnabled("feature_cross_signing");