Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#167702381: implement dynamic venue for specific event #256

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ShallowWrapper {
socialEvent={Object {}}
startDate=""
title=""
venue=""
/>,
Symbol(enzyme.__renderer__): Object {
"batchedUpdates": [Function],
Expand Down Expand Up @@ -39,7 +40,7 @@ ShallowWrapper {
className="event-card__label"
>
<p>
Lagos

</p>
</div>
<div
Expand Down Expand Up @@ -114,7 +115,7 @@ ShallowWrapper {
className="event-card__label"
>
<p>
Lagos

</p>
</div>,
<div
Expand Down Expand Up @@ -203,7 +204,7 @@ ShallowWrapper {
"nodeType": "host",
"props": Object {
"children": <p>
Lagos

</p>,
"className": "event-card__label",
},
Expand All @@ -213,10 +214,10 @@ ShallowWrapper {
"key": undefined,
"nodeType": "host",
"props": Object {
"children": "Lagos",
"children": "",
},
"ref": null,
"rendered": "Lagos",
"rendered": "",
"type": "p",
},
"type": "div",
Expand Down Expand Up @@ -448,7 +449,7 @@ ShallowWrapper {
className="event-card__label"
>
<p>
Lagos

</p>
</div>
<div
Expand Down Expand Up @@ -523,7 +524,7 @@ ShallowWrapper {
className="event-card__label"
>
<p>
Lagos

</p>
</div>,
<div
Expand Down Expand Up @@ -612,7 +613,7 @@ ShallowWrapper {
"nodeType": "host",
"props": Object {
"children": <p>
Lagos

</p>,
"className": "event-card__label",
},
Expand All @@ -622,10 +623,10 @@ ShallowWrapper {
"key": undefined,
"nodeType": "host",
"props": Object {
"children": "Lagos",
"children": "",
},
"ref": null,
"rendered": "Lagos",
"rendered": "",
"type": "p",
},
"type": "div",
Expand Down
2 changes: 1 addition & 1 deletion client/actions/eventActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const createEvent = (eventData) => {
error: false
})
})
.catch(error => handleError(error, dispatch));
.catch(error => handleError(error.message.split(":")[1], dispatch));
};
}

Expand Down
10 changes: 6 additions & 4 deletions client/components/cards/EventCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import SlackIcon from '../../assets/icons/SlackIcon';
const EventCard = (props) => {
document.title = 'Events page';
const {
id, title, startDate, socialEvent, featuredImage,
id, title, startDate, venue, socialEvent, featuredImage,
} = props;

const date = new Date(startDate);
const shortMonths = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
const shortMonth = shortMonths[date.getMonth()];
Expand All @@ -22,10 +22,10 @@ const EventCard = (props) => {
<img src={featuredImage || '/assets/img/img_group_selfie.jpg'} alt={title} className="event-card__picture" />
</div>
<div className="event-card__label">
<p>Lagos</p>
<p>{venue}</p>
</div>
<div className="event-card__action">
<p className="event-card__slack">{<SlackIcon width="100%" color="black" />}</p>
<p className="event-card__slack">{<SlackIcon width="100%" color="black" />}</p>
</div>
<div className="event-card__caption-group">
<div className="event-card__date">
Expand All @@ -46,6 +46,7 @@ const EventCard = (props) => {
EventCard.propTypes = {
id: PropTypes.string,
title: PropTypes.string,
venue: PropTypes.string,
startDate: PropTypes.string,
featuredImage: PropTypes.string,
socialEvent: PropTypes.objectOf(PropTypes.any),
Expand All @@ -54,6 +55,7 @@ EventCard.propTypes = {
EventCard.defaultProps = {
id: '',
title: '',
venue: '',
startDate: '',
socialEvent: {},
featuredImage: '',
Expand Down