Skip to content

Commit

Permalink
fix: use title or eventTitle on homepage featured events based on sec…
Browse files Browse the repository at this point in the history
…tionHandle (#684)
  • Loading branch information
axamei authored Feb 14, 2023
1 parent 035f705 commit 4911a36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions gql/queries/Homepage.gql
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ query Homepage {
uri
workshopOrEventSeriesType
title
eventTitle
startDateWithTime
@formatDateTime(
format: "Y-m-d\\TH:i"
Expand Down
6 changes: 6 additions & 0 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ export default {
return {
...bannerFeaturedEvent,
to: `/${bannerFeaturedEvent.uri}`,
title: bannerFeaturedEvent.sectionHandle === "workshopOrEventSeries"
? bannerFeaturedEvent.title
: bannerFeaturedEvent.eventTitle,
prompt:
bannerFeaturedEvent.sectionHandle ===
"workshopOrEventSeries"
Expand Down Expand Up @@ -233,6 +236,9 @@ export default {
return {
...obj,
to: `/${obj.uri}`,
title: obj.sectionHandle === "workshopOrEventSeries"
? obj.title
: obj.eventTitle,
image: _get(obj, "heroImage[0].image[0]", null),
startDate:
obj.sectionHandle === "event"
Expand Down

8 comments on commit 4911a36

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.