function getDisplayName(Component) {
  if (typeof Component === 'string') {
    return Component
  }

  if (!Component) {
    return undefined
  }

  return Component.displayName || Component.name || 'Component'
}
Get the displayName field of a component falling
back to name field then finally to "component".
@param {React.Component} Component - Component from
which to get displayName
@returns {string} Display name of component