Sha256: 4616c97ab231702cc2660e270b1c251d95e939f394b63aa343f0946b2ab1e9e7

Contents?: true

Size: 1.04 KB

Versions: 185

Compression:

Stored size: 1.04 KB

Contents

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { BrowserRouter as Router } from 'react-router-dom';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { orgId } from '../../services/api';
import * as actions from '../../scenes/Organizations/OrganizationActions';
import reducer from '../../scenes/Organizations/OrganizationReducer';
import Routes from './Routes';
import './overrides.scss';

const mapStateToProps = state => ({ organization: state.organization });
const mapDispatchToProps = dispatch => bindActionCreators(actions, dispatch);

export const organization = reducer;

class Application extends Component {
  componentDidMount() {
    this.loadData();
  }

  loadData() {
    if (orgId()) {
      this.props.loadOrganization();
    }
  }

  render() {
    return (
      <Router>
        <Routes />
      </Router>
    );
  }
}

Application.propTypes = {
  loadOrganization: PropTypes.func.isRequired,
};

export default connect(mapStateToProps, mapDispatchToProps)(Application);

Version data entries

185 entries across 185 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 webpack/containers/Application/index.js
katello-4.15.0.rc1 webpack/containers/Application/index.js
katello-4.14.1 webpack/containers/Application/index.js
katello-4.14.0 webpack/containers/Application/index.js
katello-4.14.0.rc3 webpack/containers/Application/index.js
katello-4.14.0.rc2 webpack/containers/Application/index.js
katello-4.14.0.rc1.1 webpack/containers/Application/index.js
katello-4.14.0.rc1 webpack/containers/Application/index.js
katello-4.13.1 webpack/containers/Application/index.js
katello-4.13.0 webpack/containers/Application/index.js
katello-4.12.1 webpack/containers/Application/index.js
katello-4.13.0.rc1 webpack/containers/Application/index.js
katello-4.12.0 webpack/containers/Application/index.js
katello-4.12.0.rc3 webpack/containers/Application/index.js
katello-4.12.0.rc2 webpack/containers/Application/index.js
katello-4.12.0.rc1 webpack/containers/Application/index.js
katello-4.11.1 webpack/containers/Application/index.js
katello-4.11.0 webpack/containers/Application/index.js
katello-4.11.0.rc2 webpack/containers/Application/index.js
katello-4.11.0.rc1 webpack/containers/Application/index.js