ifmeorg/ifme

View on GitHub
client/app/components/BaseContainer/StoryContainer.jsx

Summary

Maintainability
A
0 mins
Test Coverage
// @flow
import React from 'react';
import type { Node } from 'react';
import { Story } from 'components/Story';
import type { Props as StoryProps } from 'components/Story';

export type Props = {
  data: StoryProps[],
};

const StoryContainer = ({ data }: Props): Node => (
  <div className="gridTwo">
    {data.map((storyProps) => (
      <div className="gridTwoItemBoxLight" key={storyProps.link}>
        <Story
          date={storyProps.date}
          categories={storyProps.categories}
          moods={storyProps.moods}
          storyType={storyProps.storyType}
          storyBy={storyProps.storyBy}
          actions={storyProps.actions}
          draft={storyProps.draft}
          name={storyProps.name}
          link={storyProps.link}
          body={storyProps.body}
          medicationBody={storyProps.medicationBody}
        />
      </div>
    ))}
  </div>
);

export default StoryContainer;