From f35457d50210d3aafac06dfed5a91f9bb4c9bd2a Mon Sep 17 00:00:00 2001 From: Alec Swanson Date: Fri, 26 Aug 2022 13:34:28 -0700 Subject: [PATCH] fix: guided-install position and linting --- package.json | 4 ++-- src/pages/index.jsx | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 9596a38d..61608ed1 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/pages/index.jsx b/src/pages/index.jsx index b1e11420..a2937b34 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -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'; @@ -60,6 +61,9 @@ const QuickstartsPage = ({ data, location }) => { setLoadComplete(true); }, []); + const showCarouselSection = !category && !search; + const showGuidedInstallInGrid = !showCarouselSection; + return ( <> { handleParam={handleParam} loadComplete={loadComplete} /> - {!category && !search && ( + {showCarouselSection && ( <> {mostPopularQuickstarts.length > 0 && ( <> @@ -179,8 +183,8 @@ const QuickstartsPage = ({ data, location }) => { )} @@ -217,10 +221,10 @@ const QuickstartsPage = ({ data, location }) => { > {!loadComplete && } {loadComplete && ( - )} @@ -288,7 +292,7 @@ const QuickstartsPage = ({ data, location }) => { } `} > - + {showGuidedInstallInGrid && } {/* Add pagination grid if no search term or category selected */}