From 04dfcf4cf9223b5e228b8f3a76b32c8bec1b9107 Mon Sep 17 00:00:00 2001 From: Kenny Fung Date: Wed, 3 May 2023 14:12:09 -0400 Subject: [PATCH] Make nested links optional As is, the mock data will proc an error with typescript since some of them don't have nested links available. Could either update mock data to include empty nested links or update interface to have nested links as an optional field. --- components/HeaderMenuColored/HeaderMenuColored.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/HeaderMenuColored/HeaderMenuColored.tsx b/components/HeaderMenuColored/HeaderMenuColored.tsx index 0517fc0d..4c8c67b2 100644 --- a/components/HeaderMenuColored/HeaderMenuColored.tsx +++ b/components/HeaderMenuColored/HeaderMenuColored.tsx @@ -52,7 +52,7 @@ const useStyles = createStyles((theme) => ({ })); interface HeaderSearchProps { - links: { link: string; label: string; links: { link: string; label: string }[] }[]; + links: { link: string; label: string; links?: { link: string; label: string }[] }[]; } export function HeaderMenuColored({ links }: HeaderSearchProps) {