Skip to content

Commit

Permalink
fix(PBRW-375): navigation on the cascade bidding auction screen (#11448)
Browse files Browse the repository at this point in the history
fix: navigation on the cascade auction screen

Co-authored-by: Sultan <[email protected]>
  • Loading branch information
2 people authored and olerichter00 committed Jan 28, 2025
1 parent a622770 commit da2e6cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 2 additions & 8 deletions src/app/Scenes/Sale/Sale.tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ describe("Sale", () => {
expect(navigate).toHaveBeenCalledTimes(0)
await waitFor(() => expect(navigate).toHaveBeenCalledTimes(1))
await waitFor(() =>
expect(navigate).toHaveBeenCalledWith("https://live-staging.artsy.net/live-sale-slug", {
replaceActiveModal: true,
replaceActiveScreen: true,
})
expect(navigate).toHaveBeenCalledWith("https://live-staging.artsy.net/live-sale-slug", {})
)
})

Expand All @@ -80,10 +77,7 @@ describe("Sale", () => {
expect(navigate).toHaveBeenCalledTimes(0)
await waitFor(() => expect(navigate).toHaveBeenCalledTimes(1))
await waitFor(() =>
expect(navigate).toHaveBeenCalledWith("https://live-staging.artsy.net/live-sale-slug", {
replaceActiveModal: true,
replaceActiveScreen: true,
})
expect(navigate).toHaveBeenCalledWith("https://live-staging.artsy.net/live-sale-slug", {})
)
})

Expand Down
5 changes: 1 addition & 4 deletions src/app/Scenes/Sale/Sale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ export const Sale: React.FC<Props> = ({ sale, me, below, relay }) => {
const switchToLive = () => {
const liveBaseURL = unsafe__getEnvironment().predictionURL
const liveAuctionURL = `${liveBaseURL}/${sale.slug}`
navigate(liveAuctionURL, {
replaceActiveScreen: true,
replaceActiveModal: true,
})
navigate(liveAuctionURL, {})
}

const viewConfigRef = useRef({ viewAreaCoveragePercentThreshold: 30 })
Expand Down

0 comments on commit da2e6cc

Please sign in to comment.