From 1bcff7a5f239c4a3d8d4a1637d019bed08fa1648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20Andre=20Tangen=20=40gorillatron?= Date: Fri, 12 Jan 2024 11:22:50 +0100 Subject: [PATCH] comment out heroslider for now since we dont use it, but might want later --- components/hero-slider/HeroSlide.tsx | 113 ++++++++++++++------------ components/hero-slider/HeroSlider.tsx | 103 +++++++++++------------ 2 files changed, 112 insertions(+), 104 deletions(-) diff --git a/components/hero-slider/HeroSlide.tsx b/components/hero-slider/HeroSlide.tsx index e95dfdc4e..caa90c1b1 100644 --- a/components/hero-slider/HeroSlide.tsx +++ b/components/hero-slider/HeroSlide.tsx @@ -10,58 +10,65 @@ export interface HeroSlideProps { } export const HeroSlide: FC = ({ banner, style, className }) => { - const isExternalLink = banner.ctaLink - ? !isCurrentOrigin(banner.ctaLink) - : false; - const linkProps = { - style: { - backgroundColor: `${banner.buttonColor}`, - borderColor: `${banner.buttonColor}`, - color: banner.buttonTextColor, - }, - className: - "leading-[42px] w-full sm:w-fit text-center sm:text-start border rounded px-5 mb-5 mr-5 font-bold", - href: banner.ctaLink, - }; + return <>; + // const link = banner.link?.isMarket + // ? `/markets/${news.link?.market?.marketId}` + // : news.link?.url; - return ( -
-
-

- {banner.title} -

-

- {banner.subtitle} -

-
- {isExternalLink ? ( - - {banner.ctaText} - - ) : ( - <> - {linkProps.href && ( - - {banner.ctaText} - - )} - - )} -
-
-
- ); + // const isExternalLink = link ? !isCurrentOrigin(link) : false; + + // const isExternalLink = banner.ctaLink + // ? !isCurrentOrigin(banner.ctaLink) + // : false; + // const linkProps = { + // style: { + // backgroundColor: `${banner.buttonColor}`, + // borderColor: `${banner.buttonColor}`, + // color: banner.buttonTextColor, + // }, + // className: + // "leading-[42px] w-full sm:w-fit text-center sm:text-start border rounded px-5 mb-5 mr-5 font-bold", + // href: banner.ctaLink, + // }; + + // return ( + //
+ //
+ //

+ // {banner.title} + //

+ //

+ // {banner.subtitle} + //

+ //
+ // {isExternalLink ? ( + // + // {banner.ctaText} + // + // ) : ( + // <> + // {linkProps.href && ( + // + // {banner.ctaText} + // + // )} + // + // )} + //
+ //
+ //
+ // ); }; diff --git a/components/hero-slider/HeroSlider.tsx b/components/hero-slider/HeroSlider.tsx index 82c3d0219..6702f5e56 100644 --- a/components/hero-slider/HeroSlider.tsx +++ b/components/hero-slider/HeroSlider.tsx @@ -12,57 +12,58 @@ const HeroSlider = ({ banners: CmsNews[]; bannerPlaceHolders: string[]; }) => { - const slider = useSliderControls({ - count: banners.length, - autoplay: 15 * 1000, - pauseOnUserInteraction: 45 * 1000, - }); + return <>; + // const slider = useSliderControls({ + // count: banners.length, + // autoplay: 15 * 1000, + // pauseOnUserInteraction: 45 * 1000, + // }); - return ( -
- {banners.map((banner, index) => ( - {`Image - ))} -
- {banners.map((banner, index) => ( - - - - ))} - {banners.length > 1 && ( - - )} -
-
- ); + // return ( + //
+ // {banners.map((banner, index) => ( + // {`Image + // ))} + //
+ // {banners.map((banner, index) => ( + // + // + // + // ))} + // {banners.length > 1 && ( + // + // )} + //
+ //
+ // ); }; export default HeroSlider;