From 3155020f67435e0f5b2f6b9c0aebf8da34366159 Mon Sep 17 00:00:00 2001 From: jp Date: Thu, 13 Aug 2026 20:04:00 +0100 Subject: [PATCH] Use 0-prefix format for who-called.co.uk lookup URLs - swap +44 prefix to 0 before lookup - applied to messages and contacts dropdown menus --- frontend/src/components/ContactsPage.tsx | 4 ++-- frontend/src/components/MessagesPage.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/ContactsPage.tsx b/frontend/src/components/ContactsPage.tsx index 561b220..a86d1a9 100644 --- a/frontend/src/components/ContactsPage.tsx +++ b/frontend/src/components/ContactsPage.tsx @@ -85,7 +85,7 @@ function DeleteBtn({ id, name }: { id: number; name?: string }) { function ContactMenu({ number, name }: { number?: string; name?: string }) { const [open, setOpen] = useState(false); const digits = (number || "").replace(/[^\d+]/g, ""); - const lookup = encodeURIComponent(digits); + const lookup = encodeURIComponent(digits.startsWith("+44") ? "0" + digits.slice(3) : digits); return ( <> @@ -121,7 +121,7 @@ function ContactMenu({ number, name }: { number?: string; name?: string }) { )} @@ -192,7 +192,7 @@ function MsgContactMenu({ number, name, callerid }: { number?: string; name?: st )}