Skip to content

Commit

Permalink
fix #1270 (will test against prod data)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkrick committed Aug 18, 2017
1 parent 51465bf commit 3d0f86e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class OutcomeCardContainer extends Component {
});
};


setEditorRef = (c) => {
this.setState({
editorRef: c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import appTheme from 'universal/styles/theme/appTheme';
import {ib, overflowTouch} from 'universal/styles/helpers';
import ui from 'universal/styles/ui';
import TeamArchiveHeader from 'universal/modules/teamDashboard/components/TeamArchiveHeader/TeamArchiveHeader';
import OutcomeCardContainer from 'universal/modules/outcomeCard/containers/OutcomeCard/OutcomeCardContainer';
import Helmet from 'universal/components/ParabolHelmet/ParabolHelmet';
import FontAwesome from 'react-fontawesome';
import getRallyLink from 'universal/modules/userDashboard/helpers/getRallyLink';
import OutcomeOrNullCard from 'universal/components/OutcomeOrNullCard/OutcomeOrNullCard';
import {TEAM_DASH} from 'universal/utils/constants';

const iconStyle = {
...ib,
Expand All @@ -18,7 +19,7 @@ const iconStyle = {
};

const TeamArchive = (props) => {
const {archivedProjects, styles, teamId, teamName} = props;
const {archivedProjects, styles, teamId, teamName, userId} = props;
return (
<div className={css(styles.root)}>
<Helmet title={`${teamName} Archive | Parabol`} />
Expand All @@ -32,9 +33,10 @@ const TeamArchive = (props) => {
<div className={css(styles.cardGrid)}>
{archivedProjects.map((project) =>
(<div className={css(styles.cardBlock)} key={`cardBlockFor${project.id}`}>
<OutcomeCardContainer
<OutcomeOrNullCard
key={project.id}
form={`archived::${project.id}`}
area={TEAM_DASH}
myUserId={userId}
outcome={project}
/>
</div>)
Expand All @@ -60,7 +62,8 @@ TeamArchive.propTypes = {
styles: PropTypes.object,
teamId: PropTypes.string,
teamName: PropTypes.string,
teamMembers: PropTypes.array
teamMembers: PropTypes.array,
userId: PropTypes.string.isRequired
};

const styleThunk = () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,19 @@ const mapStateToProps = (state, props) => {
const {archivedProjects} = teamArchiveContainer.data;
return {
archivedProjects,
teamId
teamId,
userId
};
};

const TeamArchiveContainer = (props) => {
const {archivedProjects, teamId, teamName} = props;
const {archivedProjects, teamId, teamName, userId} = props;
return (
<TeamArchive
archivedProjects={archivedProjects}
teamId={teamId}
teamName={teamName}
userId={userId}
/>
);
};
Expand All @@ -83,7 +85,8 @@ TeamArchiveContainer.propTypes = {
archivedProjects: PropTypes.array.isRequired,
match: PropTypes.object.isRequired,
teamId: PropTypes.string.isRequired,
teamName: PropTypes.string
teamName: PropTypes.string,
userId: PropTypes.string.isRequired
};

export default connect(mapStateToProps)(TeamArchiveContainer);

0 comments on commit 3d0f86e

Please sign in to comment.