From bc7f7588efec9b86025df51f0c019dff26373405 Mon Sep 17 00:00:00 2001 From: Mitchell Magro Date: Wed, 14 Jan 2026 19:27:06 +0100 Subject: [PATCH] Solving styling issues --- src/config/cashierConfig.ts | 2 +- src/features/cashier/Cashier.tsx | 1 + src/index.scss | 10 +++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/config/cashierConfig.ts b/src/config/cashierConfig.ts index 2a00367..6cc4faf 100644 --- a/src/config/cashierConfig.ts +++ b/src/config/cashierConfig.ts @@ -134,7 +134,7 @@ export function getCashierConfig(): ICashierConfig { const userId = params.get('userId')?.trim(); if (userId) { config.userId = userId; - } else if (import.meta.env.DEV) { + } else if (config.environment === 'development' && !config.userId) { // Development fallback: use a default numeric userId for testing // The API expects customer ID to be a numeric value config.userId = '123'; diff --git a/src/features/cashier/Cashier.tsx b/src/features/cashier/Cashier.tsx index c34e7aa..921ee2c 100644 --- a/src/features/cashier/Cashier.tsx +++ b/src/features/cashier/Cashier.tsx @@ -38,6 +38,7 @@ function Cashier() { } // Auto-fill customer IP if available and not already set + // NOTE: This is not needed anymore as the IP is now set in the form metadata or HTTP headers if (customerIp) { // Check if IP field exists in form metadata and populate it const ipField = formMetadata.find( diff --git a/src/index.scss b/src/index.scss index efb2ff1..6ab6c24 100644 --- a/src/index.scss +++ b/src/index.scss @@ -1,7 +1,9 @@ // Global styles +html, :root { width: 100%; + height: 100%; font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; line-height: 1.5; font-weight: 400; @@ -28,10 +30,16 @@ a { body { margin: 0; + width: 100%; + height: 100%; display: flex; place-items: center; min-width: 320px; - min-height: 100vh; +} + +#root { + width: 100%; + height: 100%; } h1 {