From 27f64d4992ec96aba62ae36b1582204887c53fc2 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 11 Jul 2026 12:58:58 +0000 Subject: [PATCH] Changes Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com> --- src/components/PaymentTestModeBanner.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/components/PaymentTestModeBanner.tsx diff --git a/src/components/PaymentTestModeBanner.tsx b/src/components/PaymentTestModeBanner.tsx new file mode 100644 index 0000000..7865139 --- /dev/null +++ b/src/components/PaymentTestModeBanner.tsx @@ -0,0 +1,19 @@ +const clientToken = import.meta.env.VITE_PAYMENTS_CLIENT_TOKEN as string | undefined; + +export function PaymentTestModeBanner() { + if (!clientToken) { + return ( +
+ Skarpa betalningar är inte konfigurerade. Slutför go-live i Payments-fliken. +
+ ); + } + if (clientToken.startsWith("pk_test_")) { + return ( +
+ Alla betalningar i förhandsvisningen är i testläge. Använd kort 4242 4242 4242 4242, valfritt framtida datum och CVC. +
+ ); + } + return null; +}