From 0f9bbfeeb12914e14fd6b85e1a554069185addb2 Mon Sep 17 00:00:00 2001 From: Brian Beckerle <49686530+brainbicycle@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:44:37 -0500 Subject: [PATCH] fix: purchase button disappears (#11492) * get rid of now unused native-code-version * update license date * don't support redirecting to home from webview --- LICENSE | 2 +- package.json | 3 +-- src/app/Components/ArtsyWebView.tsx | 8 ++++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index 6d53217c8c7..6da2d71980a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2012-2022 Art.sy, Inc. +Copyright (c) 2012-2025 Art.sy, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/package.json b/package.json index e04c61e883a..6e40423de7f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "eigen", "version": "1.21.52", - "native-code-version": 44, + "license": "MIT", "description": "Artsy mobile app.", "engines": { "node": "20.x", @@ -92,7 +92,6 @@ "react-native" ], "contributors": "See docs/thanks.md", - "license": "MIT", "bugs": { "url": "https://github.com/artsy/eigen/issues" }, diff --git a/src/app/Components/ArtsyWebView.tsx b/src/app/Components/ArtsyWebView.tsx index 3793e37db08..b3fc890c8d2 100644 --- a/src/app/Components/ArtsyWebView.tsx +++ b/src/app/Components/ArtsyWebView.tsx @@ -226,6 +226,14 @@ export const ArtsyWebView = forwardRef< return } + // TODO: For not we are not redirecting to home from webviews because of artsy logo + // in purchase flow breaking things. We should instead hide the artsy logo or not redirect to home + // when in eigen purchase flow. + if (result.type === "match" && result.module === "Home") { + stopLoading(true) + return + } + // if it's a route that we know we don't have a native view for, keep it in the webview // only vanityURLs which do not have a native screen ends up in the webview. So also keep in webview for VanityUrls // TODO:- Handle cases where a vanityURl lands in a webview and then webview url navigation state changes