From 76a216ade303a025ba1a34897d836f57e2441963 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Mon, 6 Nov 2023 10:21:27 +0000 Subject: [PATCH] Use external hotjarNPS.css styles + add eslint prettier (#218) * use external bloom styles * add eslint-config-prettier dev dep --- package.json | 1 + src/components/Head.js | 14 +-- src/pages/_app.js | 1 - src/styles/hotjarNPS.css | 206 --------------------------------------- 4 files changed, 6 insertions(+), 216 deletions(-) delete mode 100644 src/styles/hotjarNPS.css diff --git a/package.json b/package.json index f76a536..b5a181d 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "enzyme-adapter-react-16": "^1.15.6", "eslint": "^7.8.1", "eslint-config-airbnb": "^18.2.0", + "eslint-config-prettier": "^9.0.0", "eslint-plugin-import": "^2.22.0", "eslint-plugin-jsx-a11y": "^6.3.1", "eslint-plugin-react": "^7.20.6", diff --git a/src/components/Head.js b/src/components/Head.js index b90f7c3..4dd0b24 100644 --- a/src/components/Head.js +++ b/src/components/Head.js @@ -3,16 +3,11 @@ import PropTypes from 'prop-types'; import React from 'react'; import isBrowser from '../shared/browserCheck'; -const Head = ({ - title, description, ogDescription, ogImage, ogTitle, ogImageAlt, -}) => ( +const Head = ({ title, description, ogDescription, ogImage, ogTitle, ogImageAlt }) => ( - - {title} - {' '} - | YSM - + {title} | YSM + @@ -38,7 +33,8 @@ Head.propTypes = { Head.defaultProps = { ogTitle: null, - description: 'Browse accessible resources curated by a team of survivors. Save what you love and come back anytime.', + description: + 'Browse accessible resources curated by a team of survivors. Save what you love and come back anytime.', ogDescription: null, ogImage: '/logo.png', ogImageAlt: 'Line drawing', diff --git a/src/pages/_app.js b/src/pages/_app.js index d1b2539..a7307a1 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -21,7 +21,6 @@ import { axiosGet } from '../shared/axios'; import isBrowser from '../shared/browserCheck'; import useWindowDimensions from '../shared/dimensions'; import { useStore } from '../store/store'; -import '../styles/hotjarNPS.css'; import theme from '../styles/theme'; const Footer = dynamic(() => import('../components/Footer'), { ssr: false }); diff --git a/src/styles/hotjarNPS.css b/src/styles/hotjarNPS.css deleted file mode 100644 index be694fd..0000000 --- a/src/styles/hotjarNPS.css +++ /dev/null @@ -1,206 +0,0 @@ -/* Hotjar CUSTOM styles to override default hotjar CSS */ - -._hj-widget-container ._hj-Pbej5__styles__resetStyles * { - font-family: 'Nunito', 'hotjar', 'sans-serif' !important; - } - -._hj-PZjqr__styles__surveyBranding { - display: none !important; -} - -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-5vKq2__styles__surveyContainer._hj-5vKq2__styles__surveyContainer { - width: 30rem !important; - max-width: 100vw; - border-radius: 1.25rem !important; - padding: 1.5rem !important; -} - -@media (min-width: 480px) { - ._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-5vKq2__styles__surveyContainer._hj-5vKq2__styles__surveyContainer { - bottom: 1.5rem; - } -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-kWRoL__styles__openStateToggle { - border-top-left-radius: 0.75rem !important; - border-top-right-radius: 0.75rem !important; - height: 1.25rem !important; - top: -1.25rem !important; - right: 2rem !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-8Lgv6__styles__surveyActions { - min-height: unset !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-XpAaA__styles__surveyFooter { - border: none !important; - justify-content: center !important; -} - -._hj-widget-container._hj-widget-theme-light - ._hj-s3UIi__styles__globalStyles - ._hj-S9XKO__styles__surveyTitle, -._hj-widget-container._hj-widget-theme-light - ._hj-s3UIi__styles__globalStyles - ._hj-S9XKO__styles__surveyTitle - > span { - font-weight: 500 !important; - font-size: 1rem !important; - line-height: 1.4 !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-hTm4\+__styles__answersContentWrapper { - padding: 0.5rem 0 1rem !important; -} - -/* Primary button styles */ -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-SU8LU__styles__primaryButton, -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-XpAaA__styles__surveyFooter button { - background: #ffbfa4 !important; - color: #000000 !important; - font-weight: 500 !important; - border: 1px solid #ffbfa4 !important; - border-radius: 100rem !important; - min-width: 5rem !important; - box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.15) !important; -} - - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-SU8LU__styles__primaryButton:hover, -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-XpAaA__styles__surveyFooter - button:hover { - background: rgb(255, 203, 182) !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-SU8LU__styles__primaryButton:focus, -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-XpAaA__styles__surveyFooter - button:focus { - background: rgb(255, 203, 182) !important; - box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.15) !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-SU8LU__styles__primaryButton[disabled], -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-XpAaA__styles__surveyFooter - button[disabled] { - border-color: transparent !important; -} -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-SU8LU__styles__primaryButton[disabled]:hover, -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-XpAaA__styles__surveyFooter - button[disabled]:hover { - background: rgb(255, 203, 182) !important; -} - -/* Input styles */ - -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-P-UNr__styles__inputField._hj-Wk\+wZ__styles__light { - border-color: rgba(0, 0, 0, 0.12) !important; -} - -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-P-UNr__styles__inputField._hj-Wk\+wZ__styles__light:hover { - border-color: #ffbfa4 !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-P-UNr__styles__inputField:focus { - outline: none !important; - border-color: #ffbfa4 !important; -} - -/* Scales styles */ - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-ILZpN__styles__scaleLabels { - padding-top: 0.5rem !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-CvVSY__styles__scaleOption span, -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-CvVSY__styles__scaleOption._hj-V57HW__styles__selected - span { - background: none !important; - border: 1px solid rgba(0, 0, 0, 0.12) !important; - border-radius: 2rem !important; - height: 2.125rem !important; - width: 2.125rem !important; - color: #ea0050 !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-CvVSY__styles__scaleOption span:hover { - border-color: rgba(0, 0, 0, 0.28) !important; -} - -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-CvVSY__styles__scaleOption:focus-within - span { - outline: none !important; - border-color: #ff976a !important; - border-width: 1.5px !important; -} - -/* Thank you page styles */ - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-tHiZi__styles__finalStep { - padding: 0.75rem 0.5rem 0 !important; -} - -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-2JZDx__styles__thankYouMessage._hj-iinO7__styles__withConsent { - margin-bottom: 0.75rem !important; - font-size: 1rem !important; - font-weight: 400 !important; -} - -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-cK\+L-__styles__consentMessage._hj-N21Xh__styles__light, -._hj-widget-container - ._hj_feedback_container - ._hj-cK\+L-__styles__consentMessage._hj-N21Xh__styles__light { - margin-bottom: 0 !important; - color: #000000 !important; - font-size: 0.875rem !important; -} - -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-SU8LU__styles__primaryButton._hj-oxtSd__styles__declineButton { - background-color: transparent !important; - color: #000000 !important; - margin-right: 0 !important; - box-shadow: none !important; - border-color: #ffbfa4 !important; - border: 1px solid #ffbfa4 !important; -} - -._hj-widget-container - ._hj-s3UIi__styles__globalStyles - ._hj-SU8LU__styles__primaryButton._hj-oxtSd__styles__declineButton:hover { - background: rgb(255, 203, 182) !important; - color: #000000 !important; - box-shadow: none !important; -} - -._hj-widget-container ._hj-s3UIi__styles__globalStyles ._hj-B\+0X3__styles__consentButton i, ._hj_feedback_container ._hj-B\+0X3__styles__consentButton i { - font-size: 15px !important; - height: 17px !important; -} \ No newline at end of file