fix of the day, payment + sub + music generation
This commit is contained in:
@@ -75,7 +75,15 @@ const StripeProvider = ({ children }) => {
|
||||
|
||||
if (isWeb) {
|
||||
if (typeof window !== "undefined") {
|
||||
window.location.assign(checkoutUrl);
|
||||
const openedTab = window.open(
|
||||
checkoutUrl,
|
||||
"_blank",
|
||||
"noopener,noreferrer",
|
||||
);
|
||||
// Fallback to same-tab navigation if the popup is blocked.
|
||||
if (!openedTab) {
|
||||
window.location.assign(checkoutUrl);
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw new Error("Navigation Stripe impossible dans cet environnement.");
|
||||
|
||||
Reference in New Issue
Block a user