auth0-extensions/auth0-delegated-administration-extension

View on GitHub
client/components/Users/UserInfoField.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import React, { PropTypes, Component } from 'react';
import './UserInfoField.styles.css';

export default class UserInfoField extends Component {
  static propTypes = {
    title: PropTypes.string.isRequired
  }

  shouldComponentUpdate(nextProps) {
    return nextProps.title !== this.props.title || nextProps.children !== this.props.children;
  }

  render() {
    const { title, children } = this.props;
    return (
      <div className="user-info-field">
        <div className="user-info-field-title">{title}</div>
        <span>{children}</span>
      </div>
    );
  }
}