From bb198b54fe29615b8896b190f1694498851ad7e4 Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Wed, 16 Jun 2021 18:58:09 -0700 Subject: [PATCH] Fix lints and remove console log --- gatsby/gatsby-node.js | 2 -- gatsby/src/pages/index.js | 14 ++++---------- gatsby/src/utils.js | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/gatsby/gatsby-node.js b/gatsby/gatsby-node.js index b4c6f3b..0e466fa 100644 --- a/gatsby/gatsby-node.js +++ b/gatsby/gatsby-node.js @@ -51,8 +51,6 @@ function transformMetaToNodeData(exifData, iptcData, vibrantData) { // }) , vibrantData); - console.log(vibrant); - return { exif: exifData?.exif, gps, diff --git a/gatsby/src/pages/index.js b/gatsby/src/pages/index.js index c094b0c..5d456bf 100644 --- a/gatsby/src/pages/index.js +++ b/gatsby/src/pages/index.js @@ -7,13 +7,6 @@ import { HeroA } from '../components/IndexComponents'; const IndexPage = ({ data }) => { const images = data.allFile.edges.map((edge) => edge.node); - const [palette, setPalette] = React.useState([ - [0, 0, 0], - [254, 254, 254], - [200, 200, 200], - [200, 200, 200], - [180, 180, 180], - ]); const image = React.useRef(images[Math.floor(Math.random() * images.length)]).current; const vibrant = getVibrant(image); console.log('vibrant', getVibrant(image)); @@ -69,7 +62,7 @@ export const query = graphql` allFile( filter: { sourceInstanceName: {eq: "gallery"}, - base: {in: ["DSC00201.jpg", "DSC05851.jpg", "DSC4180.jpg", "DSC08521.jpg", "DSC06245.jpg", "_DSC4949.jpg"]} + # base: {in: ["DSC00201.jpg", "DSC05851.jpg", "DSC4180.jpg", "DSC08521.jpg", "DSC06245.jpg", "_DSC4949.jpg"]} } ) { edges { @@ -80,8 +73,9 @@ export const query = graphql` gatsbyImageData( layout: FULL_WIDTH # placeholder: BLURRED - placeholder: NONE - # blurredOptions: {width: 200} + placeholder: TRACED_SVG + # placeholder: NONE + # blurredOptions: {width: 50} breakpoints: [750, 1080, 1366, 1920, 2560, 3840] ) fields { diff --git a/gatsby/src/utils.js b/gatsby/src/utils.js index 5eb149d..4106c02 100644 --- a/gatsby/src/utils.js +++ b/gatsby/src/utils.js @@ -20,7 +20,7 @@ export const getVibrantToHelmetSafeBodyStyle = (vibrant) => { '--vibrant': vibrant.Vibrant, '--dark-vibrant': vibrant.DarkVibrant, '--light-vibrant': vibrant.LightVibrant, - } + }; if (typeof window === 'undefined') { return style; }