@@ -97,10 +90,11 @@ const ListItem = ({ index, onClick, data }) => {
shouldFlip={shouldFlip(index)}
delayUntil={createCardFlipId(index)}
>
-
@@ -111,14 +105,15 @@ const ListItem = ({ index, onClick, data }) => {
}
ListItem.propTypes = {
- index: PropTypes.number,
- onClick: PropTypes.func,
- data: PropTypes.shape({
- title: PropTypes.string.isRequired,
- image: PropTypes.shape({
- alternativeText: PropTypes.string,
- }).isRequired
- }).isRequired
+ index: PropTypes.number,
+ onClick: PropTypes.func,
+ data: PropTypes.shape({
+ title: PropTypes.string.isRequired,
+ image: PropTypes.shape({
+ url: PropTypes.string,
+ alternativeText: PropTypes.string,
+ }).isRequired,
+ }).isRequired,
}
const ExpandedListItem = ({ index, data, isFirst, callToAction }) => {
@@ -146,21 +141,26 @@ const ExpandedListItem = ({ index, data, isFirst, callToAction }) => {
stagger="card-image"
delayUntil={createCardFlipId(index)}
>
-
{data.title}
-
+
{data.english_landing_page && (
-
{callToAction}
+
+ {callToAction}
+
)}
@@ -178,14 +178,14 @@ ExpandedListItem.propTypes = {
data: PropTypes.shape({
title: PropTypes.string.isRequired,
text: PropTypes.string,
- landing_page: PropTypes.shape({
+ english_landing_page: PropTypes.shape({
slug: PropTypes.string.isRequired,
}),
image: PropTypes.shape({
url: PropTypes.string.isRequired,
alternativeText: PropTypes.string,
- })
- })
+ }),
+ }),
}
const AnimatedList = ({ items, callToAction }) => {
@@ -257,10 +257,8 @@ AnimatedList.propTypes = {
items: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.number.isRequired,
- length: PropTypes.number
})
- )
+ ),
}
-
export default ExpandGrid
diff --git a/src/components/index.js b/src/components/index.js
index 9936292..be8dfc5 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -10,7 +10,6 @@ import OneSection from "./DualSection/OneSection"
import DualSection from "./DualSection/DualSection"
import AnimatedTransitionContinous from "./animatedTransitionContinous/AnimatedTransitionContinous"
import BannerTop from "./Banners/BannerTop"
-import BannerHead from "./BannerHead/BannerHead"
import Professionals from "./Professionals/Professionals"
import FeaturedBlogs from "./FeaturedBlogs/FeaturedBlogs"
import Layaout from "./layout"
@@ -31,7 +30,6 @@ export {
DualSection,
AnimatedTransitionContinous,
BannerTop,
- BannerHead,
Professionals,
FeaturedBlogs,
Layaout,
diff --git a/src/components/quote/Quote.js b/src/components/quote/Quote.js
index 59e146c..0992693 100644
--- a/src/components/quote/Quote.js
+++ b/src/components/quote/Quote.js
@@ -97,17 +97,6 @@ const Quote = ({ data }) => {
)
}
-Quote.defaultProps = {
- description: "",
- title: "",
- variant: "",
- profileDescription: "",
- videoUrl: "",
- button: {},
- profile: {},
- image: {},
-}
-
Quote.propTypes = {
data: PropTypes.shape({
title: PropTypes.string,
diff --git a/src/components/videoBackground/VideoBackground.js b/src/components/videoBackground/VideoBackground.js
index 7919d83..aeee606 100644
--- a/src/components/videoBackground/VideoBackground.js
+++ b/src/components/videoBackground/VideoBackground.js
@@ -147,10 +147,8 @@ const VideoBackground = ({ data }) => {
VideoBackground.propTypes = {
data: PropTypes.shape({
- id: PropTypes.string,
videoUrl: PropTypes.string,
description: PropTypes.string,
- strapi_component: PropTypes.string,
backgroundImage: PropTypes.shape({
url: PropTypes.string.isRequired,
}),
@@ -161,7 +159,7 @@ VideoBackground.propTypes = {
button: PropTypes.shape({
content: PropTypes.string.isRequired,
url: PropTypes.string,
- landing_page: PropTypes.shape({
+ english_landing_page: PropTypes.shape({
slug: PropTypes.string.isRequired,
}),
}),
diff --git a/src/hooks/useNavbar.js b/src/hooks/useNavbar.js
index fe3fd82..3046a07 100644
--- a/src/hooks/useNavbar.js
+++ b/src/hooks/useNavbar.js
@@ -48,7 +48,7 @@ const useNavbar = () => {
alternativeText
url
localFile {
- childrenImageSharp {
+ childImageSharp {
gatsbyImageData(placeholder: BLURRED)
}
}
@@ -64,7 +64,7 @@ const useNavbar = () => {
url
icon {
localFile {
- childrenImageSharp {
+ childImageSharp {
gatsbyImageData(placeholder: BLURRED)
}
}
diff --git a/src/templates/BlogItemDetail.js b/src/templates/BlogItemDetail.js
index 386d7c8..34701c8 100644
--- a/src/templates/BlogItemDetail.js
+++ b/src/templates/BlogItemDetail.js
@@ -1,7 +1,5 @@
import React from "react"
import { graphql } from "gatsby"
-// import showdown from "showdown"
-// import ReactMarkdown from "react-markdown"
import MarkdownView from "react-showdown"
import Layout from "../components/layout"
import { Seo, BannerTop } from "../components/index.js"
@@ -10,19 +8,11 @@ import PropTypes from "prop-types"
import { getImage, GatsbyImage } from "gatsby-plugin-image"
const BlogDetail = ({ data }) => {
- const {
- title,
- description,
- image,
- imagePage,
- author,
- seo,
- } = data?.allStrapiArticle?.nodes[0] || {}
+ const { title, description, image, imagePage, author, seo } =
+ data?.allStrapiArticle?.nodes[0] || {}
const bannerTop = imagePage ? { title, imagePage } : { title, image }
- // let { summary } = author
-
return (
{
markdown={description}
dangerouslySetInnerHTML={{ __html: description }}
/>
- {/* */}
{author?.map(author => (
-
+
{author.image && (
)}
@@ -70,7 +55,7 @@ const BlogDetail = ({ data }) => {
}
BlogDetail.propTypes = {
- data: PropTypes.shape({
+ data: PropTypes.shape({
allStrapiArticle: PropTypes.shape({
nodes: PropTypes.arrayOf(
PropTypes.shape({
@@ -82,39 +67,40 @@ BlogDetail.propTypes = {
alternativeText: PropTypes.string,
localFile: PropTypes.shape({
childImageSharp: PropTypes.shape({
- gatsbyImageData: PropTypes.object.isRequired
- })
- })
+ gatsbyImageData: PropTypes.object.isRequired,
+ }),
+ }),
}),
imagePage: PropTypes.shape({
url: PropTypes.string,
alternativeText: PropTypes.string,
localFile: PropTypes.shape({
childImageSharp: PropTypes.shape({
- gatsbyImageData: PropTypes.object.isRequired
- })
- })
+ gatsbyImageData: PropTypes.object.isRequired,
+ }),
+ }),
}),
author: PropTypes.arrayOf(
PropTypes.shape({
+ id: PropTypes.number.isRequired,
name: PropTypes.string.isRequired,
subTitle: PropTypes.string,
summary: PropTypes.string,
image: PropTypes.shape({
- url: PropTypes.string.isRequired,
+ url: PropTypes.string,
alternativeText: PropTypes.string,
localFile: PropTypes.shape({
childImageSharp: PropTypes.shape({
- gatsbyImageData: PropTypes.object.isRequired
- })
- })
- })
+ gatsbyImageData: PropTypes.object.isRequired,
+ }),
+ }),
+ }),
})
- )
+ ),
})
- )
- })
- })
+ ),
+ }),
+ }),
}
export const query = graphql`