From 89638891229abfb9d39f84dfd40f6623c5fa29f6 Mon Sep 17 00:00:00 2001 From: aftermath2 Date: Sat, 1 Apr 2023 12:00:00 +0000 Subject: [PATCH] Fix payment method icons --- frontend/src/components/PaymentMethods/StringAsIcons.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/PaymentMethods/StringAsIcons.tsx b/frontend/src/components/PaymentMethods/StringAsIcons.tsx index ac70ad02..c9aa4eea 100644 --- a/frontend/src/components/PaymentMethods/StringAsIcons.tsx +++ b/frontend/src/components/PaymentMethods/StringAsIcons.tsx @@ -33,10 +33,10 @@ const StringAsIcons: React.FC = ({ // Adds icons for each PaymentMethod that matches methods.forEach((method, i) => { - const regex = new RegExp(`\\b${method.name}\\b`, 'g'); + const regex = new RegExp(`\\b${method.name.toLowerCase()}\\b`, 'g'); - if (regex.test(customMethods)) { - customMethods = customMethods.replace(regex, ''); + if (regex.test(customMethods.toLowerCase())) { + customMethods = customMethods.replace(method.name, ''); rows.push(