Skip to content

Commit 7465893

Browse files
committed
Close #2336 #2615
1 parent bdf6b1a commit 7465893

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/shared/components/Contentful/Accordion/AccordionItem/style.scss

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
color: #394146;
6161
font: 15px/22px 'Open Sans', sans-serif;
6262
margin-bottom: 20px;
63-
opacity: 0.7;
6463

6564
&:last-child {
6665
margin-bottom: 0;

src/shared/components/NewsletterArchive/style.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
color: $tc-gray-80;
1818
font-size: 12px;
1919
line-height: 15px;
20-
margin-bottom: 0.5em;
20+
margin-bottom: 10px;
2121
display: block;
2222
}

src/shared/containers/NewsletterArchive.jsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import _ from 'lodash';
12
import React from 'react';
23
import PT from 'prop-types';
34
import { connect } from 'react-redux';
@@ -19,13 +20,14 @@ class NewsletterArchiveContainer extends React.Component {
1920

2021
render() {
2122
const {
22-
loading, error, archive,
23+
loading, error, archive, limit,
2324
} = this.props;
2425
if (loading) return <LoadingIndicator />;
2526
if (error) {
2627
return <span><strong>Error loading MailChimp archive:</strong> {error.message}</span>;
2728
}
2829
if (!archive || !archive.campaigns) return null;
30+
if (limit > 1) archive.campaigns = _.take(archive.campaigns, limit);
2931
return <NewsletterArchive archive={archive} />;
3032
}
3133
}
@@ -34,6 +36,7 @@ NewsletterArchiveContainer.defaultProps = {
3436
loading: false,
3537
archive: null,
3638
error: null,
39+
limit: null,
3740
};
3841

3942
NewsletterArchiveContainer.propTypes = {
@@ -42,6 +45,7 @@ NewsletterArchiveContainer.propTypes = {
4245
getNewsletterArchiveDone: PT.func.isRequired,
4346
archive: PT.shape(),
4447
error: PT.shape(),
48+
limit: PT.string,
4549
};
4650

4751
function mapStateToProps(state, ownProps) {

0 commit comments

Comments
 (0)