From 98c8aa9610745e55b497dfedf7e678f0e15e9f80 Mon Sep 17 00:00:00 2001 From: Marcel Raddatz Date: Fri, 10 Apr 2026 17:22:54 +0200 Subject: [PATCH] refactor(settings): remove dead accent prop from SettingsCard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The green left border was removed from the design — the accent prop, data-accent attribute, and inline style were never used on the hub page. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/lib/components/SettingsCard.svelte | 5 +---- frontend/src/lib/components/SettingsCard.test.ts | 15 ++------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/frontend/src/lib/components/SettingsCard.svelte b/frontend/src/lib/components/SettingsCard.svelte index c09dc8f..f16a95b 100644 --- a/frontend/src/lib/components/SettingsCard.svelte +++ b/frontend/src/lib/components/SettingsCard.svelte @@ -4,17 +4,14 @@ href: string; cta: string; meta?: string; - accent?: boolean; } - let { title, href, cta, meta, accent = false }: Props = $props(); + let { title, href, cta, meta }: Props = $props(); {title} diff --git a/frontend/src/lib/components/SettingsCard.test.ts b/frontend/src/lib/components/SettingsCard.test.ts index 73d53e2..be8fa13 100644 --- a/frontend/src/lib/components/SettingsCard.test.ts +++ b/frontend/src/lib/components/SettingsCard.test.ts @@ -9,9 +9,9 @@ describe('SettingsCard', () => { }); it('renders as an anchor tag with the given href', () => { - render(SettingsCard, { props: { title: 'Vorräte', href: '/household/staples?ctx=settings', cta: 'Bearbeiten →' } }); + render(SettingsCard, { props: { title: 'Vorräte', href: '/household/staples', cta: 'Bearbeiten →' } }); const link = screen.getByRole('link'); - expect(link).toHaveAttribute('href', '/household/staples?ctx=settings'); + expect(link).toHaveAttribute('href', '/household/staples'); }); it('renders the cta text', () => { @@ -29,15 +29,4 @@ describe('SettingsCard', () => { expect(screen.queryByTestId('card-meta')).not.toBeInTheDocument(); }); - it('applies accent border style when accent=true', () => { - render(SettingsCard, { props: { title: 'Vorräte', href: '/household/staples', cta: 'Bearbeiten →', accent: true } }); - const link = screen.getByRole('link'); - expect(link).toHaveAttribute('data-accent', 'true'); - }); - - it('does not apply accent when accent is not set', () => { - render(SettingsCard, { props: { title: 'Haushalt', href: '/members', cta: 'Anzeigen →' } }); - const link = screen.getByRole('link'); - expect(link).not.toHaveAttribute('data-accent', 'true'); - }); });