From 4f03b8cf47ae240137372142bdf0398ef7868b8f Mon Sep 17 00:00:00 2001 From: Krystie Date: Fri, 1 May 2026 02:41:32 -0700 Subject: [PATCH] desloppify: extract shared Premium features and move component data outside render - PricingCards.tsx: Extract repeated Premium features array to PREMIUM_FEATURES constant - Footer.tsx: Move footerSections, socialLinks, and CURRENT_YEAR outside component to avoid recreation on every render --- src/components/Footer.tsx | 88 ++++++++++++++++----------------- src/components/PricingCards.tsx | 31 +++++------- 2 files changed, 55 insertions(+), 64 deletions(-) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 04da7f7..dc94579 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,50 +1,50 @@ import Link from 'next/link'; import Image from 'next/image'; +const footerSections = [ + { + title: 'Product', + links: [ + { label: 'Features', href: '/features' }, + { label: 'Pricing', href: '/pricing' }, + { label: 'Documentation', href: '/docs' }, + { label: 'About', href: '/about' }, + ], + }, + { + title: 'Resources', + links: [ + { label: 'Getting Started', href: '/docs' }, + { label: 'API Reference', href: '/docs#api' }, + { label: 'Community', href: '#' }, + ], + }, + { + title: 'Support', + links: [ + { label: 'Contact', href: 'mailto:support@dashcaddy.net' }, + { label: 'Discord', href: '#' }, + { label: 'Privacy Policy', href: '#' }, + { label: 'Terms of Service', href: '#' }, + ], + }, +]; + +const socialLinks = [ + { + icon: ( + + + + ), + label: 'Discord', + href: '#', + }, +]; + +const CURRENT_YEAR = new Date().getFullYear(); + export default function Footer() { - const currentYear = new Date().getFullYear(); - - const footerSections = [ - { - title: 'Product', - links: [ - { label: 'Features', href: '/features' }, - { label: 'Pricing', href: '/pricing' }, - { label: 'Documentation', href: '/docs' }, - { label: 'About', href: '/about' }, - ], - }, - { - title: 'Resources', - links: [ - { label: 'Getting Started', href: '/docs' }, - { label: 'API Reference', href: '/docs#api' }, - { label: 'Community', href: '#' }, - ], - }, - { - title: 'Support', - links: [ - { label: 'Contact', href: 'mailto:support@dashcaddy.net' }, - { label: 'Discord', href: '#' }, - { label: 'Privacy Policy', href: '#' }, - { label: 'Terms of Service', href: '#' }, - ], - }, - ]; - - const socialLinks = [ - { - icon: ( - - - - ), - label: 'Discord', - href: '#', - }, - ]; - return (