@treely/strapi-slices 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/components/CreditsAvailableBadge/CreditsAvailableBadge.d.ts +7 -0
- package/dist/components/CreditsAvailableBadge/index.d.ts +2 -0
- package/dist/components/CreditsAvailableBadge/messages.de.d.ts +7 -0
- package/dist/components/CreditsAvailableBadge/messages.en.d.ts +7 -0
- package/dist/components/FullScreenImage/FullScreenImage.d.ts +8 -0
- package/dist/components/FullScreenImage/ZoomableImage.d.ts +7 -0
- package/dist/components/FullScreenImage/index.d.ts +2 -0
- package/dist/components/MinimalProviders/MinimalProviders.d.ts +7 -0
- package/dist/components/MinimalProviders/index.d.ts +2 -0
- package/dist/components/SliceRenderer/SliceRenderer.d.ts +12 -0
- package/dist/components/SliceRenderer/index.d.ts +2 -0
- package/dist/components/StrapiLinkButton/StrapiLinkButton.d.ts +18 -0
- package/dist/components/StrapiLinkButton/index.d.ts +2 -0
- package/dist/components/StrapiLinkButtonWithIcon/StrapiLinkButtonWithIcon.d.ts +7 -0
- package/dist/components/StrapiLinkButtonWithIcon/index.d.ts +2 -0
- package/dist/components/portfolio/Contact/Contact.d.ts +10 -0
- package/dist/components/portfolio/Contact/index.d.ts +2 -0
- package/dist/components/portfolio/DocumentsDownloadList/DocumentsDownloadList.d.ts +6 -0
- package/dist/components/portfolio/DocumentsDownloadList/index.d.ts +2 -0
- package/dist/components/portfolio/DocumentsDownloadList/messages.de.d.ts +5 -0
- package/dist/components/portfolio/DocumentsDownloadList/messages.en.d.ts +5 -0
- package/dist/components/portfolio/ProjectInfo/ProjectInfo.d.ts +18 -0
- package/dist/components/portfolio/ProjectInfo/index.d.ts +2 -0
- package/dist/components/portfolio/ProjectInfo/messages.de.d.ts +15 -0
- package/dist/components/portfolio/ProjectInfo/messages.en.d.ts +15 -0
- package/dist/components/portfolio/SmallCheckout/SmallCheckout.d.ts +13 -0
- package/dist/components/portfolio/SmallCheckout/index.d.ts +2 -0
- package/dist/components/portfolio/SmallCheckout/messages.de.d.ts +16 -0
- package/dist/components/portfolio/SmallCheckout/messages.en.d.ts +16 -0
- package/dist/constants/animations.d.ts +1 -0
- package/dist/constants/api.d.ts +3 -0
- package/dist/constants/breakpoints.d.ts +8 -0
- package/dist/constants/domain.d.ts +2 -0
- package/dist/constants/fontCustomizations.d.ts +6 -0
- package/dist/constants/formatter.d.ts +6 -0
- package/dist/constants/globalStyle.d.ts +1 -0
- package/dist/constants/mapbox.d.ts +17 -0
- package/dist/constants/strapi.d.ts +1 -0
- package/dist/icons/LinkedInIcon.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -0
- package/dist/models/BBox.d.ts +2 -0
- package/dist/models/CreditsAvailableState.d.ts +7 -0
- package/dist/models/Locale.d.ts +2 -0
- package/dist/models/PortfolioProject.d.ts +7 -0
- package/dist/models/forms/CheckoutForm.d.ts +4 -0
- package/dist/models/fpm/FPMProject.d.ts +37 -0
- package/dist/models/fpm/Issuer.d.ts +6 -0
- package/dist/models/strapi/IStrapi.d.ts +4 -0
- package/dist/models/strapi/IStrapiData.d.ts +5 -0
- package/dist/models/strapi/IStrapiResponse.d.ts +13 -0
- package/dist/models/strapi/StrapiAuthor.d.ts +10 -0
- package/dist/models/strapi/StrapiAvatarWithName.d.ts +8 -0
- package/dist/models/strapi/StrapiBanner.d.ts +9 -0
- package/dist/models/strapi/StrapiBlogPost.d.ts +25 -0
- package/dist/models/strapi/StrapiButtonWithVariant.d.ts +6 -0
- package/dist/models/strapi/StrapiCategory.d.ts +8 -0
- package/dist/models/strapi/StrapiContactArea.d.ts +10 -0
- package/dist/models/strapi/StrapiCustomerStory.d.ts +21 -0
- package/dist/models/strapi/StrapiDefaultHeader.d.ts +6 -0
- package/dist/models/strapi/StrapiGlobal.d.ts +26 -0
- package/dist/models/strapi/StrapiGlossaryItem.d.ts +6 -0
- package/dist/models/strapi/StrapiHeroCard.d.ts +13 -0
- package/dist/models/strapi/StrapiImage.d.ts +10 -0
- package/dist/models/strapi/StrapiImageFormat.d.ts +12 -0
- package/dist/models/strapi/StrapiImageWithLink.d.ts +6 -0
- package/dist/models/strapi/StrapiLink.d.ts +11 -0
- package/dist/models/strapi/StrapiLinkList.d.ts +7 -0
- package/dist/models/strapi/StrapiLinkPage.d.ts +10 -0
- package/dist/models/strapi/StrapiLinkWithIcon.d.ts +7 -0
- package/dist/models/strapi/StrapiLocalization.d.ts +7 -0
- package/dist/models/strapi/StrapiMedia.d.ts +27 -0
- package/dist/models/strapi/StrapiMetadata.d.ts +13 -0
- package/dist/models/strapi/StrapiNavMenu.d.ts +13 -0
- package/dist/models/strapi/StrapiPage.d.ts +17 -0
- package/dist/models/strapi/StrapiPortfolio.d.ts +10 -0
- package/dist/models/strapi/StrapiPortfolioCard.d.ts +15 -0
- package/dist/models/strapi/StrapiProject.d.ts +23 -0
- package/dist/models/strapi/StrapiProjectCard.d.ts +18 -0
- package/dist/models/strapi/StrapiQuoteCard.d.ts +7 -0
- package/dist/models/strapi/StrapiShapesCard.d.ts +11 -0
- package/dist/models/strapi/StrapiTextCardWithIcons.d.ts +8 -0
- package/dist/models/strapi/StrapiTopBanner.d.ts +7 -0
- package/dist/rootMessages.de.d.ts +58 -0
- package/dist/rootMessages.en.d.ts +58 -0
- package/dist/slices/Blog/Blog.d.ts +10 -0
- package/dist/slices/Blog/index.d.ts +2 -0
- package/dist/slices/Blog/styles.d.ts +9 -0
- package/dist/slices/BlogCards/BlogCards.d.ts +18 -0
- package/dist/slices/BlogCards/BlogCards.stories.d.ts +5 -0
- package/dist/slices/BlogCards/index.d.ts +2 -0
- package/dist/slices/Comparison/Comparison.d.ts +33 -0
- package/dist/slices/Comparison/Comparison.stories.d.ts +6 -0
- package/dist/slices/Comparison/Icon.d.ts +7 -0
- package/dist/slices/Comparison/index.d.ts +2 -0
- package/dist/slices/Comparison/messages.de.d.ts +4 -0
- package/dist/slices/Comparison/messages.en.d.ts +4 -0
- package/dist/slices/Cta/Cta.d.ts +26 -0
- package/dist/slices/Cta/Cta.stories.d.ts +9 -0
- package/dist/slices/Cta/index.d.ts +2 -0
- package/dist/slices/Cta/messages.de.d.ts +5 -0
- package/dist/slices/Cta/messages.en.d.ts +5 -0
- package/dist/slices/CtaOnly/CtaOnly.d.ts +8 -0
- package/dist/slices/CtaOnly/CtaOnly.stories.d.ts +3 -0
- package/dist/slices/CtaOnly/index.d.ts +2 -0
- package/dist/slices/CustomerStories/CustomerStories.d.ts +10 -0
- package/dist/slices/CustomerStories/CustomerStories.stories.d.ts +3 -0
- package/dist/slices/CustomerStories/index.d.ts +2 -0
- package/dist/slices/CustomerStories/messages.de.d.ts +4 -0
- package/dist/slices/CustomerStories/messages.en.d.ts +4 -0
- package/dist/slices/Facts/Facts.d.ts +16 -0
- package/dist/slices/Facts/Facts.stories.d.ts +7 -0
- package/dist/slices/Facts/index.d.ts +2 -0
- package/dist/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.d.ts +10 -0
- package/dist/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.stories.d.ts +4 -0
- package/dist/slices/FullWidthHighlightQuote/index.d.ts +2 -0
- package/dist/slices/FullWidthImage/FullWidthImage.d.ts +11 -0
- package/dist/slices/FullWidthImage/FullWidthImage.stories.d.ts +5 -0
- package/dist/slices/FullWidthImage/index.d.ts +2 -0
- package/dist/slices/FullWidthImage/styles.d.ts +5 -0
- package/dist/slices/FullWidthImageSlider/FullWidthImageSlider.d.ts +12 -0
- package/dist/slices/FullWidthImageSlider/FullWidthImageSlider.stories.d.ts +3 -0
- package/dist/slices/FullWidthImageSlider/index.d.ts +2 -0
- package/dist/slices/FullWidthImageSlider/styles.d.ts +295 -0
- package/dist/slices/FullWidthImageSlider/utils.d.ts +1 -0
- package/dist/slices/Glossary/Glossary.d.ts +9 -0
- package/dist/slices/Glossary/Glossary.stories.d.ts +3 -0
- package/dist/slices/Glossary/index.d.ts +2 -0
- package/dist/slices/Glossary/messages.de.d.ts +6 -0
- package/dist/slices/Glossary/messages.en.d.ts +6 -0
- package/dist/slices/Hero/Hero.d.ts +17 -0
- package/dist/slices/Hero/Hero.stories.d.ts +9 -0
- package/dist/slices/Hero/index.d.ts +2 -0
- package/dist/slices/Hero/styles.d.ts +17 -0
- package/dist/slices/IconGrid/IconGrid.d.ts +18 -0
- package/dist/slices/IconGrid/IconGrid.stories.d.ts +5 -0
- package/dist/slices/IconGrid/index.d.ts +2 -0
- package/dist/slices/IconGrid/styles.d.ts +9 -0
- package/dist/slices/ImageGrid/ImageGrid.d.ts +18 -0
- package/dist/slices/ImageGrid/ImageGrid.stories.d.ts +5 -0
- package/dist/slices/ImageGrid/index.d.ts +2 -0
- package/dist/slices/ImageGrid/styles.d.ts +5 -0
- package/dist/slices/ImageTextSequence/ImageTextSequence.d.ts +19 -0
- package/dist/slices/ImageTextSequence/ImageTextSequence.stories.d.ts +7 -0
- package/dist/slices/ImageTextSequence/index.d.ts +2 -0
- package/dist/slices/ImageTextSequence/styles.d.ts +13 -0
- package/dist/slices/LeftTextRightCard/LeftTextRightCard.d.ts +17 -0
- package/dist/slices/LeftTextRightCard/LeftTextRightCard.stories.d.ts +8 -0
- package/dist/slices/LeftTextRightCard/index.d.ts +2 -0
- package/dist/slices/LinkCardsGrid/LinkCardsGrid.d.ts +18 -0
- package/dist/slices/LinkCardsGrid/LinkCardsGrid.stories.d.ts +5 -0
- package/dist/slices/LinkCardsGrid/index.d.ts +2 -0
- package/dist/slices/LogoGridWithText/LogoGridWithText.d.ts +12 -0
- package/dist/slices/LogoGridWithText/LogoGridWithText.stories.d.ts +6 -0
- package/dist/slices/LogoGridWithText/index.d.ts +2 -0
- package/dist/slices/LogoGridWithText/styles.d.ts +5 -0
- package/dist/slices/MapHero/MapHero.d.ts +15 -0
- package/dist/slices/MapHero/MapHero.stories.d.ts +8 -0
- package/dist/slices/MapHero/index.d.ts +2 -0
- package/dist/slices/MapHero/styles.d.ts +21 -0
- package/dist/slices/ProjectFacts/ProjectFacts.d.ts +34 -0
- package/dist/slices/ProjectFacts/ProjectFacts.stories.d.ts +6 -0
- package/dist/slices/ProjectFacts/index.d.ts +2 -0
- package/dist/slices/ProjectFacts/messages.de.d.ts +5 -0
- package/dist/slices/ProjectFacts/messages.en.d.ts +5 -0
- package/dist/slices/ProjectsGrid/ProjectsGrid.d.ts +8 -0
- package/dist/slices/ProjectsGrid/ProjectsGrid.stories.d.ts +3 -0
- package/dist/slices/ProjectsGrid/index.d.ts +2 -0
- package/dist/slices/ProjectsMap/MapMarker.d.ts +10 -0
- package/dist/slices/ProjectsMap/ProjectsMap.d.ts +17 -0
- package/dist/slices/ProjectsMap/ProjectsMap.stories.d.ts +6 -0
- package/dist/slices/ProjectsMap/index.d.ts +2 -0
- package/dist/slices/ProjectsMap/messages.de.d.ts +4 -0
- package/dist/slices/ProjectsMap/messages.en.d.ts +4 -0
- package/dist/slices/QAndA/QAndA.d.ts +43 -0
- package/dist/slices/QAndA/QAndA.stories.d.ts +7 -0
- package/dist/slices/QAndA/index.d.ts +2 -0
- package/dist/slices/QuoteCards/QuoteCards.d.ts +15 -0
- package/dist/slices/QuoteCards/QuoteCards.stories.d.ts +8 -0
- package/dist/slices/QuoteCards/index.d.ts +2 -0
- package/dist/slices/QuoteCards/styles.d.ts +13 -0
- package/dist/slices/RichTextSection/RichTextSection.d.ts +7 -0
- package/dist/slices/RichTextSection/RichTextSection.stories.d.ts +3 -0
- package/dist/slices/RichTextSection/index.d.ts +2 -0
- package/dist/slices/ShopCheckout/ShopCheckout.d.ts +16 -0
- package/dist/slices/ShopCheckout/ShopCheckout.stories.d.ts +7 -0
- package/dist/slices/ShopCheckout/index.d.ts +2 -0
- package/dist/slices/ShopCheckout/messages.de.d.ts +15 -0
- package/dist/slices/ShopCheckout/messages.en.d.ts +15 -0
- package/dist/slices/SideBySideImages/SideBySideImages.d.ts +12 -0
- package/dist/slices/SideBySideImages/SideBySideImages.stories.d.ts +3 -0
- package/dist/slices/SideBySideImages/index.d.ts +2 -0
- package/dist/slices/SmallHero/SmallHero.d.ts +20 -0
- package/dist/slices/SmallHero/SmallHero.stories.d.ts +11 -0
- package/dist/slices/SmallHero/index.d.ts +2 -0
- package/dist/slices/SmallHero/styles.d.ts +9 -0
- package/dist/slices/Steps/Steps.d.ts +19 -0
- package/dist/slices/Steps/Steps.stories.d.ts +7 -0
- package/dist/slices/Steps/index.d.ts +2 -0
- package/dist/slices/Steps/styles.d.ts +25 -0
- package/dist/slices/TextCardGrid/TextCardGrid.d.ts +20 -0
- package/dist/slices/TextCardGrid/TextCardGrid.stories.d.ts +8 -0
- package/dist/slices/TextCardGrid/index.d.ts +2 -0
- package/dist/slices/TextCarousel/TextCarousel.d.ts +13 -0
- package/dist/slices/TextCarousel/TextCarousel.stories.d.ts +6 -0
- package/dist/slices/TextCarousel/index.d.ts +2 -0
- package/dist/slices/TextCarousel/styles.d.ts +284 -0
- package/dist/slices/TextWithCard/TextWithCard.d.ts +20 -0
- package/dist/slices/TextWithCard/TextWithCard.stories.d.ts +9 -0
- package/dist/slices/TextWithCard/index.d.ts +2 -0
- package/dist/slices/TextWithTextCards/TextWithTextCards.d.ts +15 -0
- package/dist/slices/TextWithTextCards/TextWithTextCards.stories.d.ts +7 -0
- package/dist/slices/TextWithTextCards/index.d.ts +2 -0
- package/dist/slices/TextWithTextCards/styles.d.ts +5 -0
- package/dist/slices/Video/Video.d.ts +10 -0
- package/dist/slices/Video/Video.stories.d.ts +3 -0
- package/dist/slices/Video/index.d.ts +2 -0
- package/dist/strapi-slices.cjs.development.js +39 -0
- package/dist/strapi-slices.cjs.development.js.map +1 -0
- package/dist/strapi-slices.cjs.production.min.js +2 -0
- package/dist/strapi-slices.cjs.production.min.js.map +1 -0
- package/dist/strapi-slices.esm.js +36 -0
- package/dist/strapi-slices.esm.js.map +1 -0
- package/dist/test/defaultMocks/next.d.ts +2 -0
- package/dist/test/integrationMocks/fpmProjectMock.d.ts +3 -0
- package/dist/test/mocks/portfolioProjectMock.d.ts +3 -0
- package/dist/test/setupTests.d.ts +1 -0
- package/dist/test/storybookMocks/storybookMedia.d.ts +1 -0
- package/dist/test/storybookMocks/storybookStrapiMedia.d.ts +8 -0
- package/dist/test/strapiMocks/minimalGlobalData.d.ts +4 -0
- package/dist/test/strapiMocks/strapiAvatarWithName.d.ts +12 -0
- package/dist/test/strapiMocks/strapiBlogPost.d.ts +3 -0
- package/dist/test/strapiMocks/strapiContact.d.ts +2 -0
- package/dist/test/strapiMocks/strapiCustomerStory.d.ts +3 -0
- package/dist/test/strapiMocks/strapiHeroCard.d.ts +2 -0
- package/dist/test/strapiMocks/strapiLinkPage.d.ts +3 -0
- package/dist/test/strapiMocks/strapiMedia.d.ts +3 -0
- package/dist/test/strapiMocks/strapiMetadata.d.ts +2 -0
- package/dist/test/strapiMocks/strapiPage.d.ts +3 -0
- package/dist/test/strapiMocks/strapiPortfolioCard.d.ts +2 -0
- package/dist/test/strapiMocks/strapiPortfolioMock.d.ts +3 -0
- package/dist/test/strapiMocks/strapiProject.d.ts +3 -0
- package/dist/test/strapiMocks/strapiProjectCard.d.ts +2 -0
- package/dist/test/strapiMocks/strapiQuoteCard.d.ts +2 -0
- package/dist/test/testUtils.d.ts +6 -0
- package/dist/unit.messages.de.d.ts +5 -0
- package/dist/unit.messages.en.d.ts +5 -0
- package/dist/utils/convertAreaM2ToHa.d.ts +2 -0
- package/dist/utils/convertCo2AmountKgToTons.d.ts +2 -0
- package/dist/utils/convertToKebabCase.d.ts +2 -0
- package/dist/utils/getTimeSpanInYears.d.ts +2 -0
- package/dist/utils/mergeBoundingBoxes.d.ts +3 -0
- package/dist/utils/mergeDeep.d.ts +12 -0
- package/dist/utils/openHubSpotChat.d.ts +2 -0
- package/dist/utils/strapiLinkUrl.d.ts +3 -0
- package/dist/utils/strapiMediaUrl.d.ts +5 -0
- package/package.json +132 -0
- package/src/components/CreditsAvailableBadge/CreditsAvailableBadge.test.tsx +65 -0
- package/src/components/CreditsAvailableBadge/CreditsAvailableBadge.tsx +55 -0
- package/src/components/CreditsAvailableBadge/index.ts +3 -0
- package/src/components/CreditsAvailableBadge/messages.de.ts +7 -0
- package/src/components/CreditsAvailableBadge/messages.en.ts +6 -0
- package/src/components/FullScreenImage/FullScreenImage.test.tsx +45 -0
- package/src/components/FullScreenImage/FullScreenImage.tsx +119 -0
- package/src/components/FullScreenImage/ZoomableImage.tsx +84 -0
- package/src/components/FullScreenImage/index.ts +3 -0
- package/src/components/MinimalProviders/MinimalProviders.tsx +25 -0
- package/src/components/MinimalProviders/index.ts +3 -0
- package/src/components/SliceRenderer/SliceRenderer.test.tsx +35 -0
- package/src/components/SliceRenderer/SliceRenderer.tsx +294 -0
- package/src/components/SliceRenderer/index.ts +3 -0
- package/src/components/StrapiLinkButton/StrapiLinkButton.test.tsx +58 -0
- package/src/components/StrapiLinkButton/StrapiLinkButton.tsx +55 -0
- package/src/components/StrapiLinkButton/index.ts +3 -0
- package/src/components/StrapiLinkButtonWithIcon/StrapiLinkButtonWithIcon.test.tsx +57 -0
- package/src/components/StrapiLinkButtonWithIcon/StrapiLinkButtonWithIcon.tsx +36 -0
- package/src/components/StrapiLinkButtonWithIcon/index.ts +3 -0
- package/src/components/portfolio/Contact/Contact.test.tsx +51 -0
- package/src/components/portfolio/Contact/Contact.tsx +73 -0
- package/src/components/portfolio/Contact/index.ts +3 -0
- package/src/components/portfolio/DocumentsDownloadList/DocumentsDownloadList.test.tsx +49 -0
- package/src/components/portfolio/DocumentsDownloadList/DocumentsDownloadList.tsx +76 -0
- package/src/components/portfolio/DocumentsDownloadList/index.ts +3 -0
- package/src/components/portfolio/DocumentsDownloadList/messages.de.ts +6 -0
- package/src/components/portfolio/DocumentsDownloadList/messages.en.ts +6 -0
- package/src/components/portfolio/ProjectInfo/ProjectInfo.test.tsx +81 -0
- package/src/components/portfolio/ProjectInfo/ProjectInfo.tsx +252 -0
- package/src/components/portfolio/ProjectInfo/index.ts +3 -0
- package/src/components/portfolio/ProjectInfo/messages.de.ts +19 -0
- package/src/components/portfolio/ProjectInfo/messages.en.ts +19 -0
- package/src/components/portfolio/SmallCheckout/SmallCheckout.test.tsx +166 -0
- package/src/components/portfolio/SmallCheckout/SmallCheckout.tsx +265 -0
- package/src/components/portfolio/SmallCheckout/index.ts +3 -0
- package/src/components/portfolio/SmallCheckout/messages.de.ts +26 -0
- package/src/components/portfolio/SmallCheckout/messages.en.ts +26 -0
- package/src/constants/animations.ts +1 -0
- package/src/constants/api.ts +5 -0
- package/src/constants/breakpoints.ts +9 -0
- package/src/constants/domain.ts +3 -0
- package/src/constants/fontCustomizations.ts +6 -0
- package/src/constants/formatter.ts +29 -0
- package/src/constants/globalStyle.ts +55 -0
- package/src/constants/mapbox.ts +24 -0
- package/src/constants/strapi.ts +2 -0
- package/src/icons/LinkedInIcon.tsx +23 -0
- package/src/index.tsx +1 -0
- package/src/models/BBox.ts +3 -0
- package/src/models/CreditsAvailableState.ts +8 -0
- package/src/models/Locale.ts +3 -0
- package/src/models/PortfolioProject.ts +9 -0
- package/src/models/forms/CheckoutForm.ts +5 -0
- package/src/models/fpm/FPMProject.ts +41 -0
- package/src/models/fpm/Issuer.ts +7 -0
- package/src/models/strapi/IStrapi.ts +5 -0
- package/src/models/strapi/IStrapiData.ts +6 -0
- package/src/models/strapi/IStrapiResponse.ts +15 -0
- package/src/models/strapi/StrapiAuthor.ts +12 -0
- package/src/models/strapi/StrapiAvatarWithName.ts +10 -0
- package/src/models/strapi/StrapiBanner.ts +11 -0
- package/src/models/strapi/StrapiBlogPost.ts +27 -0
- package/src/models/strapi/StrapiButtonWithVariant.ts +8 -0
- package/src/models/strapi/StrapiCategory.ts +10 -0
- package/src/models/strapi/StrapiContactArea.ts +12 -0
- package/src/models/strapi/StrapiCustomerStory.ts +23 -0
- package/src/models/strapi/StrapiDefaultHeader.ts +7 -0
- package/src/models/strapi/StrapiGlobal.ts +28 -0
- package/src/models/strapi/StrapiGlossaryItem.ts +7 -0
- package/src/models/strapi/StrapiHeroCard.ts +15 -0
- package/src/models/strapi/StrapiImage.ts +12 -0
- package/src/models/strapi/StrapiImageFormat.ts +13 -0
- package/src/models/strapi/StrapiImageWithLink.ts +8 -0
- package/src/models/strapi/StrapiLink.ts +13 -0
- package/src/models/strapi/StrapiLinkList.ts +9 -0
- package/src/models/strapi/StrapiLinkPage.ts +12 -0
- package/src/models/strapi/StrapiLinkWithIcon.ts +9 -0
- package/src/models/strapi/StrapiLocalization.ts +9 -0
- package/src/models/strapi/StrapiMedia.ts +29 -0
- package/src/models/strapi/StrapiMetadata.ts +15 -0
- package/src/models/strapi/StrapiNavMenu.ts +16 -0
- package/src/models/strapi/StrapiPage.ts +19 -0
- package/src/models/strapi/StrapiPortfolio.ts +12 -0
- package/src/models/strapi/StrapiPortfolioCard.ts +17 -0
- package/src/models/strapi/StrapiProject.ts +25 -0
- package/src/models/strapi/StrapiProjectCard.ts +20 -0
- package/src/models/strapi/StrapiQuoteCard.ts +9 -0
- package/src/models/strapi/StrapiShapesCard.ts +13 -0
- package/src/models/strapi/StrapiTextCardWithIcons.ts +10 -0
- package/src/models/strapi/StrapiTopBanner.ts +9 -0
- package/src/rootMessages.de.ts +41 -0
- package/src/rootMessages.en.ts +41 -0
- package/src/slices/Blog/Blog.test.tsx +146 -0
- package/src/slices/Blog/Blog.tsx +114 -0
- package/src/slices/Blog/index.ts +3 -0
- package/src/slices/Blog/styles.ts +34 -0
- package/src/slices/BlogCards/BlogCards.stories.tsx +148 -0
- package/src/slices/BlogCards/BlogCards.test.tsx +277 -0
- package/src/slices/BlogCards/BlogCards.tsx +210 -0
- package/src/slices/BlogCards/index.ts +3 -0
- package/src/slices/Comparison/Comparison.stories.tsx +123 -0
- package/src/slices/Comparison/Comparison.test.tsx +173 -0
- package/src/slices/Comparison/Comparison.tsx +265 -0
- package/src/slices/Comparison/Icon.test.tsx +43 -0
- package/src/slices/Comparison/Icon.tsx +34 -0
- package/src/slices/Comparison/index.ts +3 -0
- package/src/slices/Comparison/messages.de.ts +3 -0
- package/src/slices/Comparison/messages.en.ts +3 -0
- package/src/slices/Cta/Cta.stories.tsx +149 -0
- package/src/slices/Cta/Cta.test.tsx +249 -0
- package/src/slices/Cta/Cta.tsx +412 -0
- package/src/slices/Cta/index.ts +3 -0
- package/src/slices/Cta/messages.de.ts +4 -0
- package/src/slices/Cta/messages.en.ts +4 -0
- package/src/slices/CtaOnly/CtaOnly.stories.tsx +47 -0
- package/src/slices/CtaOnly/CtaOnly.test.tsx +26 -0
- package/src/slices/CtaOnly/CtaOnly.tsx +17 -0
- package/src/slices/CtaOnly/index.ts +3 -0
- package/src/slices/CustomerStories/CustomerStories.stories.tsx +20 -0
- package/src/slices/CustomerStories/CustomerStories.test.tsx +43 -0
- package/src/slices/CustomerStories/CustomerStories.tsx +84 -0
- package/src/slices/CustomerStories/index.ts +3 -0
- package/src/slices/CustomerStories/messages.de.ts +3 -0
- package/src/slices/CustomerStories/messages.en.ts +3 -0
- package/src/slices/Facts/Facts.stories.tsx +97 -0
- package/src/slices/Facts/Facts.test.tsx +99 -0
- package/src/slices/Facts/Facts.tsx +140 -0
- package/src/slices/Facts/index.ts +3 -0
- package/src/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.stories.tsx +41 -0
- package/src/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.test.tsx +39 -0
- package/src/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.tsx +57 -0
- package/src/slices/FullWidthHighlightQuote/index.ts +3 -0
- package/src/slices/FullWidthImage/FullWidthImage.stories.tsx +40 -0
- package/src/slices/FullWidthImage/FullWidthImage.test.tsx +33 -0
- package/src/slices/FullWidthImage/FullWidthImage.tsx +63 -0
- package/src/slices/FullWidthImage/index.ts +3 -0
- package/src/slices/FullWidthImage/styles.ts +17 -0
- package/src/slices/FullWidthImageSlider/FullWidthImageSlider.stories.tsx +75 -0
- package/src/slices/FullWidthImageSlider/FullWidthImageSlider.test.tsx +49 -0
- package/src/slices/FullWidthImageSlider/FullWidthImageSlider.tsx +149 -0
- package/src/slices/FullWidthImageSlider/index.ts +3 -0
- package/src/slices/FullWidthImageSlider/styles.ts +96 -0
- package/src/slices/FullWidthImageSlider/utils.test.ts +10 -0
- package/src/slices/FullWidthImageSlider/utils.ts +17 -0
- package/src/slices/Glossary/Glossary.stories.tsx +42 -0
- package/src/slices/Glossary/Glossary.test.tsx +102 -0
- package/src/slices/Glossary/Glossary.tsx +107 -0
- package/src/slices/Glossary/index.ts +3 -0
- package/src/slices/Glossary/messages.de.ts +7 -0
- package/src/slices/Glossary/messages.en.ts +6 -0
- package/src/slices/Hero/Hero.stories.tsx +129 -0
- package/src/slices/Hero/Hero.test.tsx +89 -0
- package/src/slices/Hero/Hero.tsx +95 -0
- package/src/slices/Hero/index.ts +3 -0
- package/src/slices/Hero/styles.ts +52 -0
- package/src/slices/IconGrid/IconGrid.stories.tsx +178 -0
- package/src/slices/IconGrid/IconGrid.test.tsx +81 -0
- package/src/slices/IconGrid/IconGrid.tsx +97 -0
- package/src/slices/IconGrid/index.ts +3 -0
- package/src/slices/IconGrid/styles.ts +21 -0
- package/src/slices/ImageGrid/ImageGrid.stories.tsx +92 -0
- package/src/slices/ImageGrid/ImageGrid.test.tsx +82 -0
- package/src/slices/ImageGrid/ImageGrid.tsx +89 -0
- package/src/slices/ImageGrid/index.ts +3 -0
- package/src/slices/ImageGrid/styles.ts +12 -0
- package/src/slices/ImageTextSequence/ImageTextSequence.stories.tsx +124 -0
- package/src/slices/ImageTextSequence/ImageTextSequence.test.tsx +91 -0
- package/src/slices/ImageTextSequence/ImageTextSequence.tsx +143 -0
- package/src/slices/ImageTextSequence/index.ts +3 -0
- package/src/slices/ImageTextSequence/styles.ts +33 -0
- package/src/slices/LeftTextRightCard/LeftTextRightCard.stories.tsx +93 -0
- package/src/slices/LeftTextRightCard/LeftTextRightCard.test.tsx +72 -0
- package/src/slices/LeftTextRightCard/LeftTextRightCard.tsx +108 -0
- package/src/slices/LeftTextRightCard/index.ts +3 -0
- package/src/slices/LinkCardsGrid/LinkCardsGrid.stories.tsx +60 -0
- package/src/slices/LinkCardsGrid/LinkCardsGrid.test.tsx +36 -0
- package/src/slices/LinkCardsGrid/LinkCardsGrid.tsx +95 -0
- package/src/slices/LinkCardsGrid/index.ts +3 -0
- package/src/slices/LogoGridWithText/LogoGridWithText.stories.tsx +73 -0
- package/src/slices/LogoGridWithText/LogoGridWithText.test.tsx +55 -0
- package/src/slices/LogoGridWithText/LogoGridWithText.tsx +95 -0
- package/src/slices/LogoGridWithText/index.ts +3 -0
- package/src/slices/LogoGridWithText/styles.ts +13 -0
- package/src/slices/MapHero/MapHero.stories.tsx +112 -0
- package/src/slices/MapHero/MapHero.test.tsx +85 -0
- package/src/slices/MapHero/MapHero.tsx +89 -0
- package/src/slices/MapHero/index.ts +3 -0
- package/src/slices/MapHero/styles.ts +105 -0
- package/src/slices/ProjectFacts/ProjectFacts.stories.tsx +91 -0
- package/src/slices/ProjectFacts/ProjectFacts.test.tsx +34 -0
- package/src/slices/ProjectFacts/ProjectFacts.tsx +95 -0
- package/src/slices/ProjectFacts/index.ts +3 -0
- package/src/slices/ProjectFacts/messages.de.ts +4 -0
- package/src/slices/ProjectFacts/messages.en.ts +4 -0
- package/src/slices/ProjectsGrid/ProjectsGrid.stories.tsx +72 -0
- package/src/slices/ProjectsGrid/ProjectsGrid.test.tsx +31 -0
- package/src/slices/ProjectsGrid/ProjectsGrid.tsx +80 -0
- package/src/slices/ProjectsGrid/index.ts +3 -0
- package/src/slices/ProjectsMap/MapMarker.test.tsx +79 -0
- package/src/slices/ProjectsMap/MapMarker.tsx +99 -0
- package/src/slices/ProjectsMap/ProjectsMap.stories.tsx +101 -0
- package/src/slices/ProjectsMap/ProjectsMap.test.tsx +95 -0
- package/src/slices/ProjectsMap/ProjectsMap.tsx +150 -0
- package/src/slices/ProjectsMap/index.ts +3 -0
- package/src/slices/ProjectsMap/messages.de.ts +3 -0
- package/src/slices/ProjectsMap/messages.en.ts +3 -0
- package/src/slices/QAndA/QAndA.stories.tsx +103 -0
- package/src/slices/QAndA/QAndA.test.tsx +67 -0
- package/src/slices/QAndA/QAndA.tsx +157 -0
- package/src/slices/QAndA/index.ts +3 -0
- package/src/slices/QuoteCards/QuoteCards.stories.tsx +118 -0
- package/src/slices/QuoteCards/QuoteCards.test.tsx +52 -0
- package/src/slices/QuoteCards/QuoteCards.tsx +135 -0
- package/src/slices/QuoteCards/index.ts +3 -0
- package/src/slices/QuoteCards/styles.ts +17 -0
- package/src/slices/RichTextSection/RichTextSection.stories.tsx +27 -0
- package/src/slices/RichTextSection/RichTextSection.test.tsx +20 -0
- package/src/slices/RichTextSection/RichTextSection.tsx +27 -0
- package/src/slices/RichTextSection/index.ts +3 -0
- package/src/slices/ShopCheckout/ShopCheckout.stories.tsx +76 -0
- package/src/slices/ShopCheckout/ShopCheckout.test.tsx +186 -0
- package/src/slices/ShopCheckout/ShopCheckout.tsx +228 -0
- package/src/slices/ShopCheckout/index.ts +3 -0
- package/src/slices/ShopCheckout/messages.de.ts +23 -0
- package/src/slices/ShopCheckout/messages.en.ts +23 -0
- package/src/slices/SideBySideImages/SideBySideImages.stories.tsx +39 -0
- package/src/slices/SideBySideImages/SideBySideImages.test.tsx +52 -0
- package/src/slices/SideBySideImages/SideBySideImages.tsx +57 -0
- package/src/slices/SideBySideImages/index.ts +3 -0
- package/src/slices/SmallHero/SmallHero.stories.tsx +138 -0
- package/src/slices/SmallHero/SmallHero.test.tsx +70 -0
- package/src/slices/SmallHero/SmallHero.tsx +116 -0
- package/src/slices/SmallHero/index.ts +3 -0
- package/src/slices/SmallHero/styles.ts +39 -0
- package/src/slices/Steps/Steps.stories.tsx +95 -0
- package/src/slices/Steps/Steps.test.tsx +68 -0
- package/src/slices/Steps/Steps.tsx +178 -0
- package/src/slices/Steps/index.ts +3 -0
- package/src/slices/Steps/styles.ts +64 -0
- package/src/slices/TextCardGrid/TextCardGrid.stories.tsx +156 -0
- package/src/slices/TextCardGrid/TextCardGrid.test.tsx +103 -0
- package/src/slices/TextCardGrid/TextCardGrid.tsx +285 -0
- package/src/slices/TextCardGrid/index.ts +3 -0
- package/src/slices/TextCarousel/TextCarousel.stories.tsx +104 -0
- package/src/slices/TextCarousel/TextCarousel.test.tsx +90 -0
- package/src/slices/TextCarousel/TextCarousel.tsx +91 -0
- package/src/slices/TextCarousel/index.ts +3 -0
- package/src/slices/TextCarousel/styles.ts +65 -0
- package/src/slices/TextWithCard/TextWithCard.stories.tsx +113 -0
- package/src/slices/TextWithCard/TextWithCard.test.tsx +87 -0
- package/src/slices/TextWithCard/TextWithCard.tsx +115 -0
- package/src/slices/TextWithCard/index.ts +3 -0
- package/src/slices/TextWithTextCards/TextWithTextCards.stories.tsx +121 -0
- package/src/slices/TextWithTextCards/TextWithTextCards.test.tsx +57 -0
- package/src/slices/TextWithTextCards/TextWithTextCards.tsx +167 -0
- package/src/slices/TextWithTextCards/index.ts +3 -0
- package/src/slices/TextWithTextCards/styles.ts +26 -0
- package/src/slices/Video/Video.stories.tsx +18 -0
- package/src/slices/Video/Video.test.tsx +26 -0
- package/src/slices/Video/Video.tsx +35 -0
- package/src/slices/Video/index.ts +3 -0
- package/src/test/defaultMocks/next.ts +29 -0
- package/src/test/integrationMocks/fpmProjectMock.ts +37 -0
- package/src/test/mocks/portfolioProjectMock.ts +11 -0
- package/src/test/setupTests.ts +5 -0
- package/src/test/storybookMocks/storybookMedia.ts +2 -0
- package/src/test/storybookMocks/storybookStrapiMedia.ts +58 -0
- package/src/test/strapiMocks/minimalGlobalData.ts +24 -0
- package/src/test/strapiMocks/strapiAvatarWithName.ts +12 -0
- package/src/test/strapiMocks/strapiBlogPost.ts +216 -0
- package/src/test/strapiMocks/strapiContact.ts +15 -0
- package/src/test/strapiMocks/strapiCustomerStory.ts +195 -0
- package/src/test/strapiMocks/strapiHeroCard.ts +7 -0
- package/src/test/strapiMocks/strapiLinkPage.ts +14 -0
- package/src/test/strapiMocks/strapiMedia.ts +91 -0
- package/src/test/strapiMocks/strapiMetadata.ts +12 -0
- package/src/test/strapiMocks/strapiPage.ts +683 -0
- package/src/test/strapiMocks/strapiPortfolioCard.ts +40 -0
- package/src/test/strapiMocks/strapiPortfolioMock.ts +20 -0
- package/src/test/strapiMocks/strapiProject.ts +34 -0
- package/src/test/strapiMocks/strapiProjectCard.ts +20 -0
- package/src/test/strapiMocks/strapiQuoteCard.ts +8 -0
- package/src/test/testUtils.tsx +25 -0
- package/src/unit.messages.de.ts +4 -0
- package/src/unit.messages.en.ts +4 -0
- package/src/utils/convertAreaM2ToHa.test.ts +9 -0
- package/src/utils/convertAreaM2ToHa.ts +4 -0
- package/src/utils/convertCo2AmountKgToTons.ts +4 -0
- package/src/utils/convertToKebabCase.test.ts +9 -0
- package/src/utils/convertToKebabCase.ts +10 -0
- package/src/utils/getTimeSpanInYears.test.ts +35 -0
- package/src/utils/getTimeSpanInYears.ts +14 -0
- package/src/utils/mergeBoundingBoxes.test.ts +13 -0
- package/src/utils/mergeBoundingBoxes.ts +19 -0
- package/src/utils/mergeDeep.ts +31 -0
- package/src/utils/openHubSpotChat.ts +15 -0
- package/src/utils/strapiLinkUrl.test.ts +26 -0
- package/src/utils/strapiLinkUrl.ts +13 -0
- package/src/utils/strapiMediaUrl.test.ts +54 -0
- package/src/utils/strapiMediaUrl.ts +32 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import StrapiImage from '@/models/strapi/StrapiImage';
|
|
2
|
+
import strapiMediaUrl from '@/utils/strapiMediaUrl';
|
|
3
|
+
import { Box } from 'boemly';
|
|
4
|
+
import Head from 'next/head';
|
|
5
|
+
import Image from 'next/image';
|
|
6
|
+
import React, { useState } from 'react';
|
|
7
|
+
|
|
8
|
+
interface ZoomableImageProps {
|
|
9
|
+
image: StrapiImage;
|
|
10
|
+
zoom?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const ZoomableImage = ({ image, zoom = 200 }: ZoomableImageProps) => {
|
|
14
|
+
// define and set default values to the states of the component
|
|
15
|
+
const [isZoomed, setIsZoomed] = useState(false);
|
|
16
|
+
const [backgroundPos, setBackgroundPos] = useState('50% 50%');
|
|
17
|
+
|
|
18
|
+
const imageSrc = strapiMediaUrl(image.img, 'xLarge');
|
|
19
|
+
|
|
20
|
+
const zoomInPosition = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {
|
|
21
|
+
// This will handle the calculations of the area where the image needs to zoom in depending on the user interaction
|
|
22
|
+
const zoomer = e.currentTarget.getBoundingClientRect();
|
|
23
|
+
const x = ((e.clientX - zoomer.x) / zoomer.width) * 100;
|
|
24
|
+
const y = ((e.clientY - zoomer.y) / zoomer.height) * 100;
|
|
25
|
+
setBackgroundPos(`${x}% ${y}%`);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const toggleZoomImage = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {
|
|
29
|
+
if (isZoomed) {
|
|
30
|
+
setIsZoomed(false);
|
|
31
|
+
} else {
|
|
32
|
+
// Zoom in and set the background position correctly
|
|
33
|
+
setIsZoomed(true);
|
|
34
|
+
zoomInPosition(e);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const handleClick = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {
|
|
39
|
+
toggleZoomImage(e);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const handleMove = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {
|
|
43
|
+
if (isZoomed) {
|
|
44
|
+
zoomInPosition(e);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<>
|
|
50
|
+
<Head>
|
|
51
|
+
<link rel="prefetch" as="image" href={imageSrc} />
|
|
52
|
+
</Head>
|
|
53
|
+
<Box
|
|
54
|
+
position="relative"
|
|
55
|
+
display="inline-block"
|
|
56
|
+
width="full"
|
|
57
|
+
height="full"
|
|
58
|
+
overflow="hidden"
|
|
59
|
+
flexShrink="0"
|
|
60
|
+
scrollSnapAlign="center"
|
|
61
|
+
scrollSnapStop="always"
|
|
62
|
+
draggable="false"
|
|
63
|
+
cursor={isZoomed ? 'zoom-out' : 'zoom-in'}
|
|
64
|
+
backgroundImage={isZoomed ? `url( ${imageSrc} )` : 'none'}
|
|
65
|
+
backgroundSize={`${zoom}%`}
|
|
66
|
+
backgroundPosition={backgroundPos}
|
|
67
|
+
onClick={(e) => handleClick(e)}
|
|
68
|
+
onMouseMove={(e) => handleMove(e)}
|
|
69
|
+
>
|
|
70
|
+
<Image
|
|
71
|
+
src={imageSrc}
|
|
72
|
+
alt={image.alt}
|
|
73
|
+
fill
|
|
74
|
+
style={{
|
|
75
|
+
visibility: isZoomed ? 'hidden' : 'visible',
|
|
76
|
+
objectFit: 'contain',
|
|
77
|
+
}}
|
|
78
|
+
/>
|
|
79
|
+
</Box>
|
|
80
|
+
</>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export default ZoomableImage;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FONT_CUSTOMIZATIONS } from '@/constants/fontCustomizations';
|
|
2
|
+
import rootMessagesDe from '@/rootMessages.de';
|
|
3
|
+
import rootMessagesEn from '@/rootMessages.en';
|
|
4
|
+
import { BoemlyThemeProvider } from 'boemly';
|
|
5
|
+
import { IntlProvider } from 'react-intl';
|
|
6
|
+
|
|
7
|
+
const messages = {
|
|
8
|
+
en: rootMessagesEn,
|
|
9
|
+
de: rootMessagesDe,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
interface MinimalProvidersProps {
|
|
13
|
+
locale: string;
|
|
14
|
+
children: JSX.Element | JSX.Element[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const MinimalProviders = ({ children, locale }: MinimalProvidersProps) => (
|
|
18
|
+
<IntlProvider messages={messages[locale as 'en' | 'de']} locale={locale}>
|
|
19
|
+
<BoemlyThemeProvider fonts={FONT_CUSTOMIZATIONS}>
|
|
20
|
+
{children}
|
|
21
|
+
</BoemlyThemeProvider>
|
|
22
|
+
</IntlProvider>
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export default MinimalProviders;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { render, screen } from '@/test/testUtils';
|
|
2
|
+
import SliceRenderer from '.';
|
|
3
|
+
import { SliceRendererProps } from './SliceRenderer';
|
|
4
|
+
|
|
5
|
+
const defaultProps: SliceRendererProps = {
|
|
6
|
+
slices: [],
|
|
7
|
+
blogPosts: [],
|
|
8
|
+
projects: [],
|
|
9
|
+
customerStories: [],
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const setup = (props = {}) => {
|
|
13
|
+
const combinedProps = { ...defaultProps, ...props };
|
|
14
|
+
return render(<SliceRenderer {...combinedProps} />);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
describe('The SliceRenderer component', () => {
|
|
18
|
+
it('displays an error message if the given slice is not supported', () => {
|
|
19
|
+
setup({ slices: [{ id: 1, __component: 'Not supported slice' }] });
|
|
20
|
+
|
|
21
|
+
expect(
|
|
22
|
+
screen.getByText('Slice component not supported')
|
|
23
|
+
).toBeInTheDocument();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('renders an existing slice without errors', () => {
|
|
27
|
+
setup({
|
|
28
|
+
slices: [
|
|
29
|
+
{ id: 1, __component: 'sections.rich-text', content: 'Rich text' },
|
|
30
|
+
],
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
expect(screen.getByText('Rich text')).toBeInTheDocument();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import FullWidthImage from '@/slices/FullWidthImage';
|
|
2
|
+
import Hero from '@/slices/Hero';
|
|
3
|
+
import IconGrid from '@/slices/IconGrid';
|
|
4
|
+
import ImageGrid from '@/slices/ImageGrid';
|
|
5
|
+
import ImageTextSequence from '@/slices/ImageTextSequence';
|
|
6
|
+
import LeftTextRightCard from '@/slices/LeftTextRightCard';
|
|
7
|
+
import LogoGridWithText from '@/slices/LogoGridWithText';
|
|
8
|
+
import MapHero from '@/slices/MapHero';
|
|
9
|
+
import QAndA from '@/slices/QAndA';
|
|
10
|
+
import QuoteCards from '@/slices/QuoteCards';
|
|
11
|
+
import RichTextSection from '@/slices/RichTextSection';
|
|
12
|
+
import Steps from '@/slices/Steps';
|
|
13
|
+
import TextCardGrid from '@/slices/TextCardGrid';
|
|
14
|
+
import TextCarousel from '@/slices/TextCarousel';
|
|
15
|
+
import TextWithTextCards from '@/slices/TextWithTextCards';
|
|
16
|
+
import TextWithCard from '@/slices/TextWithCard';
|
|
17
|
+
import LinkCardsGrid from '@/slices/LinkCardsGrid';
|
|
18
|
+
import SmallHero from '@/slices/SmallHero';
|
|
19
|
+
import Blog from '@/slices/Blog';
|
|
20
|
+
import StrapiBlogPost from '@/models/strapi/StrapiBlogPost';
|
|
21
|
+
import ProjectsGrid from '@/slices/ProjectsGrid';
|
|
22
|
+
import ProjectsMap from '@/slices/ProjectsMap';
|
|
23
|
+
import Video from '@/slices/Video';
|
|
24
|
+
import FullWidthHighlightQuote from '@/slices/FullWidthHighlightQuote';
|
|
25
|
+
import FullWidthImageSlider from '@/slices/FullWidthImageSlider';
|
|
26
|
+
import SideBySideImages from '@/slices/SideBySideImages';
|
|
27
|
+
import IStrapiData from '@/models/strapi/IStrapiData';
|
|
28
|
+
import Cta from '@/slices/Cta';
|
|
29
|
+
import CtaOnly from '@/slices/CtaOnly';
|
|
30
|
+
import Glossary from '@/slices/Glossary';
|
|
31
|
+
import ShopCheckout from '@/slices/ShopCheckout';
|
|
32
|
+
import Facts from '@/slices/Facts';
|
|
33
|
+
import BlogCards from '@/slices/BlogCards';
|
|
34
|
+
import PortfolioProject from '@/models/PortfolioProject';
|
|
35
|
+
import ProjectFacts from '@/slices/ProjectFacts';
|
|
36
|
+
import CustomerStories from '@/slices/CustomerStories';
|
|
37
|
+
import StrapiCustomerStory from '@/models/strapi/StrapiCustomerStory';
|
|
38
|
+
import Comparison from '@/slices/Comparison';
|
|
39
|
+
|
|
40
|
+
export interface SliceRendererProps {
|
|
41
|
+
slices: any;
|
|
42
|
+
blogPosts: IStrapiData<StrapiBlogPost>[];
|
|
43
|
+
projects: PortfolioProject[];
|
|
44
|
+
customerStories: IStrapiData<StrapiCustomerStory>[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const SliceRenderer = ({
|
|
48
|
+
slices,
|
|
49
|
+
blogPosts,
|
|
50
|
+
projects,
|
|
51
|
+
customerStories,
|
|
52
|
+
}: SliceRendererProps): JSX.Element => (
|
|
53
|
+
<>
|
|
54
|
+
{slices.map((slice: any) => {
|
|
55
|
+
switch (slice.__component) {
|
|
56
|
+
case 'sections.hero':
|
|
57
|
+
return (
|
|
58
|
+
<Hero key={`${slice.__component}-${slice.id}`} slice={slice} />
|
|
59
|
+
);
|
|
60
|
+
case 'sections.map-hero':
|
|
61
|
+
return (
|
|
62
|
+
<MapHero key={`${slice.__component}-${slice.id}`} slice={slice} />
|
|
63
|
+
);
|
|
64
|
+
case 'sections.rich-text':
|
|
65
|
+
return (
|
|
66
|
+
<RichTextSection
|
|
67
|
+
key={`${slice.__component}-${slice.id}`}
|
|
68
|
+
slice={slice}
|
|
69
|
+
/>
|
|
70
|
+
);
|
|
71
|
+
case 'sections.left-text-right-card':
|
|
72
|
+
return (
|
|
73
|
+
<LeftTextRightCard
|
|
74
|
+
key={`${slice.__component}-${slice.id}`}
|
|
75
|
+
slice={slice}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
case 'sections.text-with-card':
|
|
79
|
+
return (
|
|
80
|
+
<TextWithCard
|
|
81
|
+
key={`${slice.__component}-${slice.id}`}
|
|
82
|
+
slice={slice}
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
case 'sections.logo-grid-with-text':
|
|
86
|
+
return (
|
|
87
|
+
<LogoGridWithText
|
|
88
|
+
key={`${slice.__component}-${slice.id}`}
|
|
89
|
+
slice={slice}
|
|
90
|
+
/>
|
|
91
|
+
);
|
|
92
|
+
case 'sections.quote-cards':
|
|
93
|
+
return (
|
|
94
|
+
<QuoteCards
|
|
95
|
+
key={`${slice.__component}-${slice.id}`}
|
|
96
|
+
slice={slice}
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
case 'sections.q-and-a':
|
|
100
|
+
return (
|
|
101
|
+
<QAndA key={`${slice.__component}-${slice.id}`} slice={slice} />
|
|
102
|
+
);
|
|
103
|
+
case 'sections.image-grid':
|
|
104
|
+
return (
|
|
105
|
+
<ImageGrid key={`${slice.__component}-${slice.id}`} slice={slice} />
|
|
106
|
+
);
|
|
107
|
+
case 'sections.full-width-image':
|
|
108
|
+
return (
|
|
109
|
+
<FullWidthImage
|
|
110
|
+
key={`${slice.__component}-${slice.id}`}
|
|
111
|
+
slice={slice}
|
|
112
|
+
/>
|
|
113
|
+
);
|
|
114
|
+
case 'sections.text-with-text-cards':
|
|
115
|
+
return (
|
|
116
|
+
<TextWithTextCards
|
|
117
|
+
key={`${slice.__component}-${slice.id}`}
|
|
118
|
+
slice={slice}
|
|
119
|
+
/>
|
|
120
|
+
);
|
|
121
|
+
case 'sections.text-card-grid':
|
|
122
|
+
return (
|
|
123
|
+
<TextCardGrid
|
|
124
|
+
key={`${slice.__component}-${slice.id}`}
|
|
125
|
+
slice={slice}
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
128
|
+
case 'sections.icon-grid':
|
|
129
|
+
return (
|
|
130
|
+
<IconGrid key={`${slice.__component}-${slice.id}`} slice={slice} />
|
|
131
|
+
);
|
|
132
|
+
case 'sections.image-text-sequence':
|
|
133
|
+
return (
|
|
134
|
+
<ImageTextSequence
|
|
135
|
+
key={`${slice.__component}-${slice.id}`}
|
|
136
|
+
slice={slice}
|
|
137
|
+
/>
|
|
138
|
+
);
|
|
139
|
+
case 'sections.steps':
|
|
140
|
+
return (
|
|
141
|
+
<Steps key={`${slice.__component}-${slice.id}`} slice={slice} />
|
|
142
|
+
);
|
|
143
|
+
case 'sections.text-carousel':
|
|
144
|
+
return (
|
|
145
|
+
<TextCarousel
|
|
146
|
+
key={`${slice.__component}-${slice.id}`}
|
|
147
|
+
slice={slice}
|
|
148
|
+
/>
|
|
149
|
+
);
|
|
150
|
+
case 'sections.link-cards-grid':
|
|
151
|
+
return (
|
|
152
|
+
<LinkCardsGrid
|
|
153
|
+
key={`${slice.__component}-${slice.id}`}
|
|
154
|
+
slice={slice}
|
|
155
|
+
/>
|
|
156
|
+
);
|
|
157
|
+
case 'sections.small-hero':
|
|
158
|
+
return (
|
|
159
|
+
<SmallHero
|
|
160
|
+
key={`${slice.__component}-${slice.id}`}
|
|
161
|
+
slice={slice}
|
|
162
|
+
theme="dark"
|
|
163
|
+
/>
|
|
164
|
+
);
|
|
165
|
+
case 'sections.small-hero-light':
|
|
166
|
+
return (
|
|
167
|
+
<SmallHero
|
|
168
|
+
key={`${slice.__component}-${slice.id}`}
|
|
169
|
+
slice={slice}
|
|
170
|
+
theme="light"
|
|
171
|
+
/>
|
|
172
|
+
);
|
|
173
|
+
case 'sections.project-facts':
|
|
174
|
+
return (
|
|
175
|
+
<ProjectFacts
|
|
176
|
+
key={`${slice.__component}-${slice.id}`}
|
|
177
|
+
slice={slice}
|
|
178
|
+
project={projects.find((p) => p.id === slice.projectId)}
|
|
179
|
+
/>
|
|
180
|
+
);
|
|
181
|
+
case 'sections.projects-grid':
|
|
182
|
+
return (
|
|
183
|
+
<ProjectsGrid
|
|
184
|
+
key={`${slice.__component}-${slice.id}`}
|
|
185
|
+
slice={slice}
|
|
186
|
+
/>
|
|
187
|
+
);
|
|
188
|
+
case 'sections.projects-map':
|
|
189
|
+
return (
|
|
190
|
+
<ProjectsMap
|
|
191
|
+
key={`${slice.__component}-${slice.id}`}
|
|
192
|
+
slice={slice}
|
|
193
|
+
projects={projects}
|
|
194
|
+
/>
|
|
195
|
+
);
|
|
196
|
+
case 'sections.video':
|
|
197
|
+
return (
|
|
198
|
+
<Video key={`${slice.__component}-${slice.id}`} slice={slice} />
|
|
199
|
+
);
|
|
200
|
+
case 'sections.full-width-highlight-quote':
|
|
201
|
+
return (
|
|
202
|
+
<FullWidthHighlightQuote
|
|
203
|
+
key={`${slice.__component}-${slice.id}`}
|
|
204
|
+
slice={slice}
|
|
205
|
+
/>
|
|
206
|
+
);
|
|
207
|
+
case 'sections.full-width-image-slider':
|
|
208
|
+
return (
|
|
209
|
+
<FullWidthImageSlider
|
|
210
|
+
key={`${slice.__component}-${slice.id}`}
|
|
211
|
+
slice={slice}
|
|
212
|
+
/>
|
|
213
|
+
);
|
|
214
|
+
case 'sections.side-by-side-images':
|
|
215
|
+
return (
|
|
216
|
+
<SideBySideImages
|
|
217
|
+
key={`${slice.__component}-${slice.id}`}
|
|
218
|
+
slice={slice}
|
|
219
|
+
/>
|
|
220
|
+
);
|
|
221
|
+
case 'sections.cta-only':
|
|
222
|
+
return (
|
|
223
|
+
<CtaOnly key={`${slice.__component}-${slice.id}`} slice={slice} />
|
|
224
|
+
);
|
|
225
|
+
case 'sections.cta':
|
|
226
|
+
return <Cta key={`${slice.__component}-${slice.id}`} slice={slice} />;
|
|
227
|
+
case 'sections.shop-checkout':
|
|
228
|
+
return (
|
|
229
|
+
<ShopCheckout
|
|
230
|
+
key={`${slice.__component}-${slice.id}`}
|
|
231
|
+
slice={slice}
|
|
232
|
+
/>
|
|
233
|
+
);
|
|
234
|
+
case 'sections.facts':
|
|
235
|
+
return (
|
|
236
|
+
<Facts key={`${slice.__component}-${slice.id}`} slice={slice} />
|
|
237
|
+
);
|
|
238
|
+
case 'sections.blog-cards':
|
|
239
|
+
return (
|
|
240
|
+
<BlogCards
|
|
241
|
+
key={`${slice.__component}-${slice.id}`}
|
|
242
|
+
slice={slice}
|
|
243
|
+
blogPosts={blogPosts}
|
|
244
|
+
/>
|
|
245
|
+
);
|
|
246
|
+
case 'sections.blog':
|
|
247
|
+
return (
|
|
248
|
+
<Blog
|
|
249
|
+
key={`${slice.__component}-${slice.id}`}
|
|
250
|
+
slice={{
|
|
251
|
+
...slice,
|
|
252
|
+
blog_posts: slice.blog_posts.data,
|
|
253
|
+
}}
|
|
254
|
+
blogPosts={blogPosts}
|
|
255
|
+
/>
|
|
256
|
+
);
|
|
257
|
+
case 'sections.glossary':
|
|
258
|
+
return (
|
|
259
|
+
<Glossary
|
|
260
|
+
key={`${slice.__component}-${slice.id}`}
|
|
261
|
+
slice={{
|
|
262
|
+
...slice,
|
|
263
|
+
glossary_items: slice.glossary_items.data,
|
|
264
|
+
}}
|
|
265
|
+
/>
|
|
266
|
+
);
|
|
267
|
+
case 'sections.customer-stories':
|
|
268
|
+
return (
|
|
269
|
+
<CustomerStories
|
|
270
|
+
key={`${slice.__component}-${slice.id}`}
|
|
271
|
+
slice={{
|
|
272
|
+
...slice,
|
|
273
|
+
customer_stories: slice.customer_stories.data,
|
|
274
|
+
}}
|
|
275
|
+
customerStories={customerStories}
|
|
276
|
+
/>
|
|
277
|
+
);
|
|
278
|
+
case 'sections.comparison':
|
|
279
|
+
return (
|
|
280
|
+
<Comparison
|
|
281
|
+
key={`${slice.__component}-${slice.id}`}
|
|
282
|
+
slice={slice}
|
|
283
|
+
/>
|
|
284
|
+
);
|
|
285
|
+
default:
|
|
286
|
+
return (
|
|
287
|
+
<div key={`${slice.__component}-${slice.id}`}>
|
|
288
|
+
Slice component not supported
|
|
289
|
+
</div>
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
})}
|
|
293
|
+
</>
|
|
294
|
+
);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { render, screen } from '@/test/testUtils';
|
|
2
|
+
import StrapiLinkButton from '.';
|
|
3
|
+
import { detectAdBlockSpy } from '../../../__mocks__/adblock-detect-react';
|
|
4
|
+
import { StrapiLinkButtonProps } from './StrapiLinkButton';
|
|
5
|
+
|
|
6
|
+
const defaultProps: StrapiLinkButtonProps = {
|
|
7
|
+
link: {
|
|
8
|
+
id: 1,
|
|
9
|
+
text: 'Text',
|
|
10
|
+
url: '/url',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const setup = (props = {}) => {
|
|
15
|
+
const combinedProps = { ...defaultProps, ...props };
|
|
16
|
+
render(<StrapiLinkButton {...combinedProps} />);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
describe('The StrapiLinkButton component', () => {
|
|
20
|
+
afterEach(() => {
|
|
21
|
+
detectAdBlockSpy.mockRestore();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('displays a link', () => {
|
|
25
|
+
setup();
|
|
26
|
+
|
|
27
|
+
expect(screen.getByRole('link')).toBeInTheDocument();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('displays the button as a link if an url is passed in the link', () => {
|
|
31
|
+
setup();
|
|
32
|
+
|
|
33
|
+
expect(screen.getByRole('link')).toHaveAttribute(
|
|
34
|
+
'href',
|
|
35
|
+
defaultProps.link.url
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('displays the custom HubSpot launcher if intercomLauncher is true in the link', () => {
|
|
40
|
+
setup({ link: { id: 1, text: 'Text', intercomLauncher: true } });
|
|
41
|
+
|
|
42
|
+
expect(screen.getByRole('button')).not.toHaveAttribute(
|
|
43
|
+
'href',
|
|
44
|
+
defaultProps.link.url
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('opens an email to hello@tree.ly if an ad blocker is active and intercomLauncher is true', () => {
|
|
49
|
+
detectAdBlockSpy.mockReturnValue(true);
|
|
50
|
+
|
|
51
|
+
setup({ link: { id: 1, text: 'Text', intercomLauncher: true } });
|
|
52
|
+
|
|
53
|
+
expect(screen.getByRole('link')).toHaveAttribute(
|
|
54
|
+
'href',
|
|
55
|
+
'mailto:hello@tree.ly'
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Button } from 'boemly';
|
|
2
|
+
import Link from 'next/link';
|
|
3
|
+
import { useDetectAdBlock } from 'adblock-detect-react';
|
|
4
|
+
import StrapiLink from '@/models/strapi/StrapiLink';
|
|
5
|
+
import strapiLinkUrl from '@/utils/strapiLinkUrl';
|
|
6
|
+
import openHubSpotChat from '@/utils/openHubSpotChat';
|
|
7
|
+
|
|
8
|
+
export interface StrapiLinkButtonProps {
|
|
9
|
+
link: StrapiLink;
|
|
10
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
variant?: 'solid' | 'outline' | 'outlineWhite' | 'link' | 'ghost';
|
|
12
|
+
colorScheme?: 'primary' | 'gray' | 'orange' | 'green' | 'white';
|
|
13
|
+
rightIcon?: JSX.Element;
|
|
14
|
+
leftIcon?: JSX.Element;
|
|
15
|
+
mt?: any;
|
|
16
|
+
mr?: any;
|
|
17
|
+
mb?: any;
|
|
18
|
+
ml?: any;
|
|
19
|
+
mx?: any;
|
|
20
|
+
my?: any;
|
|
21
|
+
background?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const StrapiLinkButton: React.FC<StrapiLinkButtonProps> = ({
|
|
25
|
+
link,
|
|
26
|
+
...buttonProps
|
|
27
|
+
}: StrapiLinkButtonProps) => {
|
|
28
|
+
const adBlockDetected = useDetectAdBlock();
|
|
29
|
+
|
|
30
|
+
if (link.intercomLauncher) {
|
|
31
|
+
if (adBlockDetected) {
|
|
32
|
+
return (
|
|
33
|
+
<Link href="mailto:hello@tree.ly" passHref legacyBehavior>
|
|
34
|
+
<Button {...buttonProps} as="a">
|
|
35
|
+
{link.text}
|
|
36
|
+
</Button>
|
|
37
|
+
</Link>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Button {...buttonProps} onClick={openHubSpotChat}>
|
|
43
|
+
{link.text}
|
|
44
|
+
</Button>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<Link href={strapiLinkUrl(link)} passHref legacyBehavior>
|
|
50
|
+
<Button {...buttonProps} as="a">
|
|
51
|
+
{link.text}
|
|
52
|
+
</Button>
|
|
53
|
+
</Link>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { render, screen } from '@/test/testUtils';
|
|
2
|
+
import StrapiLinkButtonWithIcon from '.';
|
|
3
|
+
import { StrapiLinkButtonWithIconProps } from './StrapiLinkButtonWithIcon';
|
|
4
|
+
|
|
5
|
+
const defaultProps: StrapiLinkButtonWithIconProps = {
|
|
6
|
+
link: {
|
|
7
|
+
id: 1,
|
|
8
|
+
link: { id: 1, text: 'Text', url: '/url' },
|
|
9
|
+
destination: 'linkedin',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const setup = (props: Partial<StrapiLinkButtonWithIconProps> = {}) => {
|
|
14
|
+
const combinedProps: StrapiLinkButtonWithIconProps = {
|
|
15
|
+
...defaultProps,
|
|
16
|
+
...props,
|
|
17
|
+
};
|
|
18
|
+
render(<StrapiLinkButtonWithIcon {...combinedProps} />);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
describe('The StrapiLinkButtonWithIcon component', () => {
|
|
22
|
+
it('displays a link if the destination is `linkedin`', () => {
|
|
23
|
+
setup({
|
|
24
|
+
link: {
|
|
25
|
+
id: 1,
|
|
26
|
+
link: { id: 1, text: 'Text', url: '/url' },
|
|
27
|
+
destination: 'linkedin',
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
expect(screen.getByRole('link')).toHaveAttribute('href', '/url');
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('displays a link if the destination is `web`', () => {
|
|
35
|
+
setup({
|
|
36
|
+
link: {
|
|
37
|
+
id: 1,
|
|
38
|
+
link: { id: 1, text: 'Text', url: '/url' },
|
|
39
|
+
destination: 'web',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
expect(screen.getByRole('link')).toHaveAttribute('href', '/url');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('displays a link if the destination is `other`', () => {
|
|
47
|
+
setup({
|
|
48
|
+
link: {
|
|
49
|
+
id: 1,
|
|
50
|
+
link: { id: 1, text: 'Text', url: '/url' },
|
|
51
|
+
destination: 'other',
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
expect(screen.getByRole('link')).toHaveAttribute('href', '/url');
|
|
56
|
+
});
|
|
57
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CaretRight, Globe } from '@phosphor-icons/react';
|
|
2
|
+
import LinkedInIcon from '@/icons/LinkedInIcon';
|
|
3
|
+
import StrapiLinkWithIcon from '@/models/strapi/StrapiLinkWithIcon';
|
|
4
|
+
import StrapiLinkButton from '../StrapiLinkButton';
|
|
5
|
+
import { StrapiLinkButtonProps } from '../StrapiLinkButton/StrapiLinkButton';
|
|
6
|
+
|
|
7
|
+
export interface StrapiLinkButtonWithIconProps
|
|
8
|
+
extends Omit<StrapiLinkButtonProps, 'link'> {
|
|
9
|
+
link: StrapiLinkWithIcon;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const StrapiLinkButtonWithIcon: React.FC<
|
|
13
|
+
StrapiLinkButtonWithIconProps
|
|
14
|
+
> = ({ link, ...props }: StrapiLinkButtonWithIconProps) => {
|
|
15
|
+
const getLinkIcon = (destination: string) => {
|
|
16
|
+
switch (destination) {
|
|
17
|
+
case 'linkedin': {
|
|
18
|
+
return <LinkedInIcon />;
|
|
19
|
+
}
|
|
20
|
+
case 'web': {
|
|
21
|
+
return <Globe />;
|
|
22
|
+
}
|
|
23
|
+
default: {
|
|
24
|
+
return <CaretRight />;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<StrapiLinkButton
|
|
31
|
+
{...props}
|
|
32
|
+
link={link.link}
|
|
33
|
+
rightIcon={getLinkIcon(link.destination)}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
};
|