Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@iskounen
Copy link
Contributor

This PR updates the PartnerMeta component to use the router's current URL to set the canonical URL for each of the sub-pages in the Partner app:

  1. /partner/:partnerId/shows
  2. /partner/:partnerId/viewing-rooms
  3. /partner/:partnerId/works
  4. /partner/:partnerId/artists
  5. /partner/:partnerId/articles
  6. /partner/:partnerId/contact

Each of these is currently referencing /partner/:partnerId as its canonical URL, and after this PR they will each be self-referencing instead. For those pages with pagination, the page=N query param will be included in the URL for pages > 1.


This PR also sneaks in a refactor. I noticed that there is some logic to set the canonical URL to an artist's page when an artistId is present in the URL. However, the route that anticipates an artistid is redirecting to the /partner/:partnerId/artist#:artistId route without rendering, so this is dead code:

{
  path: "artists/:artistId",
  render: ({ match }) => {
    // Legacy path: redirect to hash-based anchor
    throw new RedirectException(
      `/partner/${match.params.partnerId}/artists#${match.params.artistId}`,
      301,
    )
  },
},

cc: @artsy/diamond-devs

@iskounen iskounen self-assigned this Jan 20, 2026

const href = `${getENV("APP_URL")}${pathname}`
const canonicalHref = artistId
? `${getENV("APP_URL")}/artist/${artistId}`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the scenario that I am refactoring out. I don't believe that this code is reachable now that /partner/:partnerId/artists/:artistId is (301) redirecting to /partner/:partnerId/artists#artistId.

Copy link
Member

@anandaroop anandaroop left a comment

Choose a reason for hiding this comment

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

Works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants