From c61534d33a3cb0d0d40d7f95ad5e00132bc5a1f2 Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Mon, 16 Mar 2026 14:46:17 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20update=20busin?= =?UTF-8?q?ess=20card?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add correct qr and association entry --- public/images/qr.svg | 915 +++++++++++------- .../BusinessCardPage.test.tsx | 2 + .../pages/BusinessCardPage/envVars.ts | 3 +- .../pages/BusinessCardPage/index.tsx | 11 +- 4 files changed, 577 insertions(+), 354 deletions(-) diff --git a/public/images/qr.svg b/public/images/qr.svg index 7470ba9..38bf26f 100644 --- a/public/images/qr.svg +++ b/public/images/qr.svg @@ -1,351 +1,566 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/pages/BusinessCardPage/BusinessCardPage.test.tsx b/src/components/pages/BusinessCardPage/BusinessCardPage.test.tsx index c5c1c79..7be4ee5 100644 --- a/src/components/pages/BusinessCardPage/BusinessCardPage.test.tsx +++ b/src/components/pages/BusinessCardPage/BusinessCardPage.test.tsx @@ -6,6 +6,7 @@ import BusinessCardPage from './index.js' vi.mock('./envVars.js', () => ({ NAME: 'Test Name', + ASSOCIATION: 'Test Association', POSITION: 'Test Position', VAT: 'Test VAT', PHONE: '+123456789', @@ -28,6 +29,7 @@ describe('BusinessCardPage', () => { // Name appears in uppercase in the first card expect(screen.getByText('Test Name')).toBeInTheDocument() + expect(screen.getByText('Test Association')).toBeInTheDocument() expect(screen.getByText('Test Position')).toBeInTheDocument() // Check if values are rendered correctly in the second card diff --git a/src/components/pages/BusinessCardPage/envVars.ts b/src/components/pages/BusinessCardPage/envVars.ts index 4ae8393..aa7a3f3 100644 --- a/src/components/pages/BusinessCardPage/envVars.ts +++ b/src/components/pages/BusinessCardPage/envVars.ts @@ -1,6 +1,7 @@ /* istanbul ignore file */ export const NAME = import.meta.env.VITE_BC_NAME || '[FULL NAME]' -export const POSITION = import.meta.env.VITE_BC_POSITION || 'Ass. di rievocazione storica affiliata C.E.R.S. (XIV-XV secolo)' +export const ASSOCIATION = import.meta.env.VITE_BC_ASSOCIATION || 'Ass. di rievocazione storica affiliata C.E.R.S.' +export const POSITION = import.meta.env.VITE_BC_POSITION || '(fine XIV - inizio XV secolo)' export const PHONE = import.meta.env.VITE_BC_PHONE || null export const EMAIL = import.meta.env.VITE_BC_EMAIL || '[Redacted for privacy]' export const FACEBOOK = import.meta.env.VITE_BC_FACEBOOK || 'compagniadarmedelsantoluca' diff --git a/src/components/pages/BusinessCardPage/index.tsx b/src/components/pages/BusinessCardPage/index.tsx index e753125..1080005 100644 --- a/src/components/pages/BusinessCardPage/index.tsx +++ b/src/components/pages/BusinessCardPage/index.tsx @@ -150,10 +150,15 @@ const BusinessCardPage = () => { color="text.secondary" fontSize="0.55rem" fontFamily="Oswald, sans-serif" - textTransform="uppercase" + // textTransform="uppercase" fontWeight={700}> {env.NAME} + {env.ASSOCIATION != null && ( + + {env.ASSOCIATION} + + )} {env.POSITION} @@ -180,7 +185,7 @@ const BusinessCardPage = () => { { }, }}>