import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as helpers from '../helpers'; import * as uiActions from '../services/ui/actions'; class DebugInfo extends React.Component { constructor(props) { super(props); } localStorageSize() { let data = ''; for (const key in window.localStorage) { if (window.localStorage.hasOwnProperty(key)) { data += window.localStorage[key]; } } let used = 0; const total = 5000; if (data !== '') { used = ((data.length * 16) / (8 * 1024)).toFixed(2); } return { used, percent: (used / total * 100).toFixed(2), }; } renderLoadQueue() { if (!this.props.ui.load_queue) { return null; } const { load_queue } = this.props.ui; const queue = []; return (