Preserve parameters

This was needed for the purchase success to be relayed back.
This commit is contained in:
Manav Rathi 2024-04-15 10:56:06 +05:30
parent 8d24a489f6
commit 95c0f53d21
No known key found for this signature in database

View file

@ -11,7 +11,9 @@ import { loadStripe } from "@stripe/stripe-js";
export const parseAndHandleRequest = async () => {
// See: [Note: Intercept payments redirection to desktop app]
if (window.location.pathname == "/desktop-redirect") {
window.location.href = "ente://app";
const desktopRedirectURL = new URL("ente://app/gallery");
desktopRedirectURL.search = new URL(window.location.href).search;
window.location.href = desktopRedirectURL.href;
return;
}