message: EventSection now class in preperation for switchboard
diff: @@ -8,11 +8,18 @@ export interface Props {
  data: any
  }
  -const renderEvents = events => {
  - return events.map((event, i) => {
  +export class EventSection extends React.Component<Props> {
  + viewAllPressed = () => {
  + // FIXME: Open city list view
  + console.log("All pressed")
  + }
  +
  + renderEvents = () => {
  + const { data } = this.props
  + return data.map((event, i) => {
  if (i < 2) {
  return (
  - <Box key={i}>
  + <Box key={event.id}>
  <Event event={event} />
  </Box>
  )
  @@ -20,22 +27,18 @@ const renderEvents = events => {
  })
  }
  -const viewAllPressed = () => {
  - // FIXME: Open city list view
  - console.log("All pressed")
  -}
  -
  -export const EventSection: React.SFC<Props> = (props: Props) => {
  - const { data } = props
  + render() {
  + const { data, title } = this.props
  return (
  <>
  <Box my={2} px={2}>
  - <Serif size="8">{props.title}</Serif>
  + <Serif size="8">{title}</Serif>
  </Box>
  - {renderEvents(data)}
  + {this.renderEvents()}
  <Box px={2} mb={2}>
  - <CaretButton onPress={() => viewAllPressed()} text={`View all ${data.length} shows`} />
  + <CaretButton onPress={() => this.viewAllPressed()} text={`View all ${data.length} shows`} />
  </Box>
  </>
  )
  }
  +}
  