From 563c4c7df1dd367dac3d0eb54b0fa3ef02c65981 Mon Sep 17 00:00:00 2001 From: MananTank Date: Thu, 17 Apr 2025 19:41:27 +0000 Subject: [PATCH] Dashboard: disable prefetch for footer links (#6756) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR refactors the `AppFooter` component in `app-footer.tsx` by introducing a new `footerLinks` array to manage footer link data and replaces individual `Link` components with a new `FooterLink` function to enhance maintainability and readability. ### Detailed summary - Added `footerLinks` array containing link objects with `href` and `label`. - Replaced individual `Link` components with a mapped `FooterLink` component. - Introduced `FooterLink` function to streamline link rendering and improve code clarity. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../src/@/components/blocks/app-footer.tsx | 100 +++++++++--------- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/apps/dashboard/src/@/components/blocks/app-footer.tsx b/apps/dashboard/src/@/components/blocks/app-footer.tsx index 5f104b6d774..877b1aa1996 100644 --- a/apps/dashboard/src/@/components/blocks/app-footer.tsx +++ b/apps/dashboard/src/@/components/blocks/app-footer.tsx @@ -15,6 +15,37 @@ type AppFooterProps = { containerClassName?: string; }; +const footerLinks = [ + { + href: "/home", + label: "Home", + }, + { + href: "https://blog.thirdweb.com", + label: "Blog", + }, + { + href: "https://portal.thirdweb.com/changelog", + label: "Changelog", + }, + { + href: "https://feedback.thirdweb.com/", + label: "Feedback", + }, + { + href: "https://thirdweb.com/privacy-policy", + label: "Privacy Policy", + }, + { + href: "https://thirdweb.com/terms", + label: "Terms of Service", + }, + { + href: "https://thirdweb.com/chainlist", + label: "Chainlist", + }, +]; + export function AppFooter(props: AppFooterProps) { return ( ); } + +function FooterLink(props: { + href: string; + label: string; + prefetch?: boolean; +}) { + return ( + + {props.label} + + ); +}