Skip to content

Commit

Permalink
Merge pull request #69 from datasektionen/bugnrsueitnrie
Browse files Browse the repository at this point in the history
Fix bug not passing in arguments to EventInfoSidebar
  • Loading branch information
Herkarl authored Apr 2, 2024
2 parents 173093c + 177a9c9 commit 30ee469
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/News/SingleNews.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const EventInfoSidebar = ({item, lang}) => // item CAN'T be undefined here
</div>
</div>


export const SingleItem = ({ item, location, lang, match }) =>
<Calypso type='item' search={'/' + match.params.postId}>
{(item) => // item CAN be undefined here
Expand Down Expand Up @@ -154,7 +153,7 @@ export const SingleItem = ({ item, location, lang, match }) =>
</div>
{(item.googleForm || item.facebookEvent) &&
<div className="row">
{item.googleForm &&
{item.googleForm &&
<div className={item.facebookEvent ? cx('col-xs-6', styles['no-padding-right']) : 'col-xs-12'}>
<a className={styles.gdocs} href={item.googleForm} target="_blank" rel="noopener noreferrer">
<i className="fab fa-fw fa-google"/>{' '}
Expand All @@ -165,7 +164,7 @@ export const SingleItem = ({ item, location, lang, match }) =>
</a>
</div>
}
{item.facebookEvent &&
{item.facebookEvent &&
<div className={item.googleForm ? cx('col-xs-6', styles['no-padding-left']) : 'col-xs-12'}>
<a className={styles.fb} href={item.facebookEvent} target="_blank" rel="noopener noreferrer">
<i className="fab fa-fw fa-facebook-f"/>{' '}
Expand All @@ -180,7 +179,7 @@ export const SingleItem = ({ item, location, lang, match }) =>
}
</div>
{item.itemType === "EVENT" &&
<EventInfoSidebar />
<EventInfoSidebar item={item} lang={lang} />
}
</div>
}
Expand Down

0 comments on commit 30ee469

Please sign in to comment.