|
|
|
@@ -52,11 +52,14 @@ export default function CaseStudyPage() { |
|
|
|
|
|
|
|
const [{ data, isLoading, isError }, doFetch] = useFetchCollections(strapi); |
|
|
|
|
|
|
|
useAnalytics(''); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
document.title = ''; |
|
|
|
}, []); |
|
|
|
if (data && data[0].attributes) document.title = `Case Study: ${data[0].attributes.SlugHeading}`; |
|
|
|
}, [data]); |
|
|
|
|
|
|
|
// useEffect(() => { |
|
|
|
// data && useAnalytics(data[0].attributes.Slug); |
|
|
|
// },[data]) |
|
|
|
|
|
|
|
if (isLoading) { |
|
|
|
return ( |
|
|
|
@@ -73,16 +76,25 @@ export default function CaseStudyPage() { |
|
|
|
{data && data[0].attributes.SEO && data[0].attributes.SEO.length > 0 && ( |
|
|
|
<ReactHelmet seo={data[0].attributes.SEO} /> |
|
|
|
)} |
|
|
|
{data && data.length > 0 && ( |
|
|
|
{data && ( |
|
|
|
<div className="bg-baby-blue dark:bg-dg-primary-1700 w-full pt-20 md:pt-24"> |
|
|
|
{/* Heading Section */} |
|
|
|
<section |
|
|
|
id="heading" |
|
|
|
className={ |
|
|
|
`flex flex-col items-center justify-center m-auto py-16 md:py-32 bg-cover bg-[url('${api_url + data[0].attributes.BackgroundImage.data?.attributes.url}')]` |
|
|
|
'flex flex-col items-center relative justify-center m-auto py-16 md:py-32' |
|
|
|
} |
|
|
|
> |
|
|
|
<div className="my-8 flex flex-col md:flex-row justify-start items-center w-full max-w-custom px-8 xl:px-0"> |
|
|
|
<div className="absolute top-0 left-[-50%] lg:left-0 right-[-50%] lg:right-0 bottom-0"> |
|
|
|
<img |
|
|
|
src={api_url + data[0].attributes.BackgroundImage.data?.attributes.url} |
|
|
|
alt={ |
|
|
|
data[0].attributes.BackgroundImage.data?.attributes.alternativeText |
|
|
|
} |
|
|
|
className="text-center z-0 m-auto object-cover h-full lg:w-full" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="my-8 flex flex-col md:flex-row justify-start items-center w-full max-w-custom px-8 xl:px-0 z-10"> |
|
|
|
{data[0].attributes.Heading && ( |
|
|
|
<div className="w-full"> |
|
|
|
<h6 className="subheading">{data[0].attributes.Heading.subtitle}</h6> |
|
|
|
@@ -102,7 +114,7 @@ export default function CaseStudyPage() { |
|
|
|
</section> |
|
|
|
|
|
|
|
<Wrapper padding={' py-90p'}> |
|
|
|
{data[0].attributes.Stat && data[0].attributes.Stat > 0 && ( |
|
|
|
{data[0].attributes.Stat && ( |
|
|
|
<motion.section |
|
|
|
id="status-numbers" |
|
|
|
className="flex flex-col md:flex-row items-start justify-between w-full gap-90p px-90p" |