cornucopia
cornucopia copied to clipboard
Issue: Duplicate helper function across taxonomy components
The helper function FormatToDoubleDigitSearchstring is duplicated in both:
- webAppCardTaxonomy.svelte
- mobileAppCardTaxonomy.svelte
Expected Shared logic should be extracted to a common utility module and imported in both components.
Why
- Reduces code duplication
- Improves maintainability
- Prevents inconsistent behavior if the formatting logic ever changes
Proposed fix
- Create src/lib/utils/formatSearchString.ts or similar
- Move FormatToDoubleDigitSearchstring there
- Import and use it from both components
@sydseter, I’d be happy to work on this and open a PR if you could assign it to me.
@Suresh-Krishna-P I have assigned you. Thank you for your time.