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

fix(FX-3300): return only running fairs #3412

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

dimatretyak
Copy link
Contributor

@dimatretyak dimatretyak commented Sep 13, 2021

The type of this PR is: Fix
Solves: FX-3300

Description

  • Art Fair rail is appearing on the homepage, even though the fair has not yet launched. Clicking into the fair leads to a 404 error.
  • Fairs should not be appearing on homepage rail ahead of start date.

Demo

It's now September 13

{
  "data": {
    "homePage": {
      "artworkModules": [
        {
          "key": "current_fairs",
          "context": {
            "name": "The Armory Show 2021",
            "exhibitionPeriod": "Sep 9 – 30"
          }
        }
      ]
    }
  }
}

GraphiQL 2021-09-13 15-30-05

Copy link
Contributor

@iskounen iskounen left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this problem!

src/schema/v2/home/fetch.ts Outdated Show resolved Hide resolved
@dimatretyak dimatretyak force-pushed the dimatretyak/fix/return-only-active-fairs branch from 1b0fe1d to 0e6977f Compare September 13, 2021 13:34

export const featuredFair = (
fairsLoader: LoadersWithoutAuthentication["fairsLoader"]
) => {
return fairsLoader({
size: 5,
active: true,
sort: "-start_at",
Copy link
Member

Choose a reason for hiding this comment

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

FYI, I believe the fairs API endpoint also supports a status param which you might be able to use in order to filter down to running fairs without the explicit datetime comparison here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. The fair endpoint supports a status param. Thanks!

@dimatretyak dimatretyak force-pushed the dimatretyak/fix/return-only-active-fairs branch 3 times, most recently from fc691c2 to 80ba6ee Compare September 14, 2021 12:17
@dimatretyak dimatretyak force-pushed the dimatretyak/fix/return-only-active-fairs branch from 80ba6ee to 57b9463 Compare September 14, 2021 12:18
@dimatretyak dimatretyak merged commit 76ca5ea into master Sep 15, 2021
@dimatretyak dimatretyak deleted the dimatretyak/fix/return-only-active-fairs branch September 15, 2021 09:07
@artsy-peril artsy-peril bot mentioned this pull request Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants