Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
fix: guided-install position and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
aswanson-nr committed Aug 26, 2022
1 parent f645efb commit f35457d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"serve": "gatsby serve",
"serve:production": "yarn serve --prefix-paths",
"clean": "gatsby clean",
"lint": "yarn eslint .",
"lint-fix": "yarn eslint . --fix",
"lint": "yarn eslint --ext .jsx --ext .js --ext .ts --ext .tsx .",
"lint-fix": "yarn eslint --ext .jsx --ext .js --ext .ts --ext .tsx . --fix",
"format": "prettier --write \"./**/*.js\"",
"fetch-quickstarts": "node ./scripts/actions/fetch-quickstarts.js",
"build:related-content": "BUILD_RELATED_CONTENT=true yarn run build",
Expand Down
16 changes: 10 additions & 6 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import CategoryDropdown from '@components/indexComponents/CategoryDropdown';
import QuickstartGrid from '@components/QuickstartGrid';
import GoToTopButton from '@components/GoToTopButton';
import SliderWrapper from '@components/SliderWrapper';

const COLUMN_BREAKPOINT = '1131px';
// used to set the height of the Spinner to reduce layout shift on page load
const TILE_HEIGHT = '362px';
Expand Down Expand Up @@ -60,6 +61,9 @@ const QuickstartsPage = ({ data, location }) => {
setLoadComplete(true);
}, []);

const showCarouselSection = !category && !search;
const showGuidedInstallInGrid = !showCarouselSection;

return (
<>
<IOSeo
Expand Down Expand Up @@ -141,7 +145,7 @@ const QuickstartsPage = ({ data, location }) => {
handleParam={handleParam}
loadComplete={loadComplete}
/>
{!category && !search && (
{showCarouselSection && (
<>
{mostPopularQuickstarts.length > 0 && (
<>
Expand Down Expand Up @@ -179,8 +183,8 @@ const QuickstartsPage = ({ data, location }) => {
<SliderWrapper
indexSettings={indexSettings}
quickstarts={mostPopularQuickstarts}
category='MostPopularQuickstartClick'
showSuperTiles={true}
category="MostPopularQuickstartClick"
showSuperTiles
/>
)}
</div>
Expand Down Expand Up @@ -217,10 +221,10 @@ const QuickstartsPage = ({ data, location }) => {
>
{!loadComplete && <Spinner />}
{loadComplete && (
<SliderWrapper
<SliderWrapper
indexSettings={indexSettings}
quickstarts={featuredQuickstarts}
category='FeaturedQuickstartClick'
category="FeaturedQuickstartClick"
/>
)}
</div>
Expand Down Expand Up @@ -288,7 +292,7 @@ const QuickstartsPage = ({ data, location }) => {
}
`}
>
<SuperTiles />
{showGuidedInstallInGrid && <SuperTiles />}

{/* Add pagination grid if no search term or category selected */}
<QuickstartGrid
Expand Down

0 comments on commit f35457d

Please sign in to comment.