Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(payment_link): changed media screen queries size for web to mobile view (#3574)

Sahkal Poddarcc6759bd2d42
diff --git a/crates/router/src/core/payment_link/payment_link_initiate/payment_link.css b/crates/router/src/core/payment_link/payment_link_initiate/payment_link.css
index ee5600e42b..bf96ef2de2 100644
--- a/crates/router/src/core/payment_link/payment_link_initiate/payment_link.css
+++ b/crates/router/src/core/payment_link/payment_link_initiate/payment_link.css
@@ -645,7 +645,7 @@ body {
animation: loading 1s linear infinite;
}
-@media only screen and (max-width: 1400px) {
+@media only screen and (max-width: 1199px) {
body {
overflow-y: scroll;
}
diff --git a/crates/router/src/core/payment_link/payment_link_initiate/payment_link.js b/crates/router/src/core/payment_link/payment_link_initiate/payment_link.js
index 75e063c3a9..068247bad8 100644
--- a/crates/router/src/core/payment_link/payment_link_initiate/payment_link.js
+++ b/crates/router/src/core/payment_link/payment_link_initiate/payment_link.js
@@ -168,7 +168,7 @@ function invert(color, bw) {
window.state = {
prevHeight: window.innerHeight,
prevWidth: window.innerWidth,
- isMobileView: window.innerWidth <= 1400,
+ isMobileView: window.innerWidth <= 1199,
currentScreen: "payment_link",
};
@@ -267,14 +267,14 @@ function initializeEventListeners(paymentDetails) {
hyperCheckoutCartImageNode.style.backgroundColor = contrastingTone;
}
- if (window.innerWidth <= 1400) {
+ if (window.innerWidth <= 1199) {
if (hyperCheckoutNode instanceof HTMLDivElement) {
hyperCheckoutNode.style.color = contrastBWColor;
}
if (hyperCheckoutFooterNode instanceof HTMLDivElement) {
hyperCheckoutFooterNode.style.backgroundColor = contrastingTone;
}
- } else if (window.innerWidth > 1400) {
+ } else if (window.innerWidth > 1199) {
if (hyperCheckoutNode instanceof HTMLDivElement) {
hyperCheckoutNode.style.color = "#333333";
}
@@ -287,7 +287,7 @@ function initializeEventListeners(paymentDetails) {
var currentHeight = window.innerHeight;
var currentWidth = window.innerWidth;
// @ts-ignore
- if (currentWidth <= 1400 && window.state.prevWidth > 1400) {
+ if (currentWidth <= 1199 && window.state.prevWidth > 1199) {
hide("#hyper-checkout-cart");
// @ts-ignore
if (window.state.currentScreen === "payment_link") {
@@ -304,7 +304,7 @@ function initializeEventListeners(paymentDetails) {
console.error("Failed to fetch primary-color, using default", error);
}
// @ts-ignore
- } else if (currentWidth > 1400 && window.state.prevWidth <= 1400) {
+ } else if (currentWidth > 1199 && window.state.prevWidth <= 1199) {
// @ts-ignore
if (window.state.currentScreen === "payment_link") {
hide("#hyper-footer");
@@ -327,7 +327,7 @@ function initializeEventListeners(paymentDetails) {
// @ts-ignore
window.state.prevWidth = currentWidth;
// @ts-ignore
- window.state.isMobileView = currentWidth <= 1400;
+ window.state.isMobileView = currentWidth <= 1199;
});
}