diff --git a/src/templates/ProjectDetails.tsx b/src/templates/ProjectDetails.tsx index 0b9732a..dc91127 100644 --- a/src/templates/ProjectDetails.tsx +++ b/src/templates/ProjectDetails.tsx @@ -1,7 +1,7 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { AllClientsDataType, ProjectCateoryType, SingleAssetFluidType } from '../utils/types'; import Layout from '../layouts/Layout'; -import { useStaticQuery, graphql, Link } from 'gatsby'; +import { useStaticQuery, graphql, Link, useScrollRestoration } from 'gatsby'; import BackgroundImage from 'gatsby-background-image'; import './project-details.scss'; import LocationIcon from '../images/svgAssets/location.svg'; @@ -65,6 +65,15 @@ const defaultSliderConfig = { // FC const ProjectDetails: React.FC = ({ location, pageContext }) => { + // + const scrollRestore = useScrollRestoration('page-component-ui-list'); + + useEffect(() => { + if (history.scrollRestoration) { + history.scrollRestoration = 'manual'; + } + }); + // fetching background image for project details page const { file, @@ -366,7 +375,7 @@ const ProjectDetails: React.FC = ({ location, pageContext } )}
{launchWebsite ? ( -
+
= ({ location, pageContext }
) : null} {googlePlayLink ? ( -
+
diff --git a/src/templates/project-details.scss b/src/templates/project-details.scss index 57b8ca9..7c6c0ea 100644 --- a/src/templates/project-details.scss +++ b/src/templates/project-details.scss @@ -233,10 +233,10 @@ nav.project-details-nav { height: calc(100vh + 14rem); } @include media-breakpoint-up(md) { - height: 75vh; + height: 76vh; } - @media (min-width: 1367px) { - height: 56vh; + @media (min-width: 1600px) { + height: 60vh; } } @@ -379,9 +379,9 @@ span.project-title { @include media-breakpoint-up(md) { height: 60vh !important; } - height: 50vh !important; - @media (min-width: 1367px) { - height: 40vh !important; + height: 55vh !important; + @media (min-width: 1600px) { + height: 50vh !important; } }