From 933f40110b3ee0c39ed5375a69290b940781133c Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Tue, 12 Mar 2024 10:36:00 -0500 Subject: [PATCH] =?UTF-8?q?Prevent=20admin=20=E2=80=A2=E2=80=A2=E2=80=A2?= =?UTF-8?q?=20menu=20prefetching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MoreMenu.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/MoreMenu.tsx b/src/components/MoreMenu.tsx index cf9f25fb..244b7cef 100644 --- a/src/components/MoreMenu.tsx +++ b/src/components/MoreMenu.tsx @@ -10,10 +10,11 @@ export default function MoreMenu({ buttonClassName, }: { items: { - label: ReactNode, - icon?: ReactNode, - href?: string, - action?: () => Promise | void, + label: ReactNode + icon?: ReactNode + href?: string + prefetch?: boolean + action?: () => Promise | void }[] className?: string buttonClassName?: string @@ -58,7 +59,7 @@ export default function MoreMenu({ 'shadow-lg dark:shadow-xl', )} > - {items.map(({ label, icon, href, action }) => + {items.map(({ label, icon, href, prefetch = false, action }) => {renderItemContent(label, icon)} }