From 32dff73dafb90affb6cf93d364e966f13e931eea Mon Sep 17 00:00:00 2001 From: "Mr. Singleton" Date: Sun, 26 Nov 2023 13:03:47 -0500 Subject: [PATCH] more react warning cleanup --- .../HeaderBlockContentLayoutContainer.tsx | 2 +- .../CustomizedThemeProvider.tsx | 1 + .../mackenzies-mind/header/FullTextSearch.tsx | 130 +++++++++--------- 3 files changed, 66 insertions(+), 67 deletions(-) diff --git a/src/components/HeaderBlockContentLayoutContainer.tsx b/src/components/HeaderBlockContentLayoutContainer.tsx index 65b19e20..cd3a920c 100644 --- a/src/components/HeaderBlockContentLayoutContainer.tsx +++ b/src/components/HeaderBlockContentLayoutContainer.tsx @@ -37,7 +37,7 @@ const HeaderBlockContentLayoutContainer: FunctionComponent = ( } else { setCustomizedTheme(TheWebsiteTheme) } + // eslint-disable-next-line }, [pageContext.page?.theme]) const getThemeFromSanity = (theme: SanityMuiTheme) => { diff --git a/src/components/templates/mackenzies-mind/header/FullTextSearch.tsx b/src/components/templates/mackenzies-mind/header/FullTextSearch.tsx index 9dfcb427..7cc92f3c 100644 --- a/src/components/templates/mackenzies-mind/header/FullTextSearch.tsx +++ b/src/components/templates/mackenzies-mind/header/FullTextSearch.tsx @@ -96,79 +96,77 @@ const FullTextSearch: FunctionComponent = (props: IProps) => { {results?.map((theResult: any) => { - { - switch (theResult?._type) { - case "ServiceItem": - const convertedServiceItem: ServiceItemNoRefType = theResult; - return - Service We - Provide: - - {convertedServiceItem.contentTitle} - {convertedServiceItem.contentText} - + switch (theResult?._type) { + case "ServiceItem": + const convertedServiceItem: ServiceItemNoRefType = theResult; + return + Service We + Provide: + + {convertedServiceItem.contentTitle} + {convertedServiceItem.contentText} - case "HeroAnimatedContentSection": - const convertedAnimatedHeroSection: HeroAnimatedContentSectionType = theResult; + + case "HeroAnimatedContentSection": + const convertedAnimatedHeroSection: HeroAnimatedContentSectionType = theResult; - return - Animated Slide - Show: - - {/*{convertedAnimatedServicesSection.title}*/} - {convertedAnimatedHeroSection.contentSlides.map((slide: SanityHeroContentSlide) => { - return - - {`${ - slide - .contentWelcomeMessage - } - ${slide.contentTitle}`} - - - {slide.contentText} - + return + Animated Slide + Show: + + {/*{convertedAnimatedServicesSection.title}*/} + {convertedAnimatedHeroSection.contentSlides.map((slide: SanityHeroContentSlide) => { + return + + {`${ + slide + .contentWelcomeMessage + } - ${slide.contentTitle}`} - })} - + + {slide.contentText} + + + })} - case "AnimatedServicesSection": - const convertedAnimatedServicesSection: AnimatedAboutUsSectionType = theResult; + + case "AnimatedServicesSection": + const convertedAnimatedServicesSection: AnimatedAboutUsSectionType = theResult; - console.log(convertedAnimatedServicesSection) - return - Services: - - {convertedAnimatedServicesSection.contentPreTitle}-{convertedAnimatedServicesSection.contentTitle} - {/*{convertedAnimatedServicesSection.title}*/} - {convertedAnimatedServicesSection.contentTexts.map((textContent: string) => { - return - - {textContent} - + console.log(convertedAnimatedServicesSection) + return + Services: + + {convertedAnimatedServicesSection.contentPreTitle}-{convertedAnimatedServicesSection.contentTitle} + {/*{convertedAnimatedServicesSection.title}*/} + {convertedAnimatedServicesSection.contentTexts.map((textContent: string) => { + return + + {textContent} - })} - + + })} - default: - return {theResult?._type} - } + + default: + return {theResult?._type} } })}