From 28fcbae6a2a9ac0eade0eb9e15cbd75046758144 Mon Sep 17 00:00:00 2001 From: javayhu Date: Fri, 5 Sep 2025 00:06:00 +0800 Subject: [PATCH] refactor: rename getFooterLinks to useFooterLinks for improved clarity and consistency --- src/components/layout/footer.tsx | 4 ++-- src/config/footer-config.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/layout/footer.tsx b/src/components/layout/footer.tsx index bf93f89..83e27d4 100644 --- a/src/components/layout/footer.tsx +++ b/src/components/layout/footer.tsx @@ -4,7 +4,7 @@ import Container from '@/components/layout/container'; import { Logo } from '@/components/layout/logo'; import { ModeSwitcherHorizontal } from '@/components/layout/mode-switcher-horizontal'; import BuiltWithButton from '@/components/shared/built-with-button'; -import { getFooterLinks } from '@/config/footer-config'; +import { useFooterLinks } from '@/config/footer-config'; import { getSocialLinks } from '@/config/social-config'; import { LocaleLink } from '@/i18n/navigation'; import { cn } from '@/lib/utils'; @@ -13,7 +13,7 @@ import type React from 'react'; export function Footer({ className }: React.HTMLAttributes) { const t = useTranslations(); - const footerLinks = getFooterLinks(); + const footerLinks = useFooterLinks(); const socialLinks = getSocialLinks(); return ( diff --git a/src/config/footer-config.tsx b/src/config/footer-config.tsx index a3207a7..f794416 100644 --- a/src/config/footer-config.tsx +++ b/src/config/footer-config.tsx @@ -15,7 +15,7 @@ import { websiteConfig } from './website'; * * @returns The footer config with translated titles */ -export function getFooterLinks(): NestedMenuItem[] { +export function useFooterLinks(): NestedMenuItem[] { const t = useTranslations('Marketing.footer'); return [