export default function EventType(props) {
  const {
    components,
    type,
    events
  } = props;
  const {
    Convention,
    Election
  } = components;
  const normalizedtype = events ? events[0].type : type;
  if (normalizedtype === 'convention') {
    return <Convention {...props} />;
  }
  return <Election {...props} />;
}