import React from "react";
import { connect } from "redux-bundler-react";
import Panel from "./Panel";

export default connect(
  "selectWestPanelContents",
  ({ westPanelContents: contents }) => {
    if (!contents) return null;
    if (!contents.length) contents = [contents];
    return (
      <Panel>
        {contents.map((Comp, i) => {
          return <Comp key={i} />;
        })}
      </Panel>
    );
  }
);
