From cbaf6977f6cd675fe5b6e6366f095306bc6bf693 Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Thu, 22 Feb 2024 13:22:41 +0100 Subject: [PATCH 1/2] Add trackColor to Switch element directly --- components/common/app-switch.js | 6 +++--- components/settings/customization/index.js | 10 ---------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/components/common/app-switch.js b/components/common/app-switch.js index 3c100fe..d45758f 100644 --- a/components/common/app-switch.js +++ b/components/common/app-switch.js @@ -4,9 +4,10 @@ import PropTypes from 'prop-types' import AppText from './app-text' -import { Containers } from '../../styles' +import { Colors, Containers } from '../../styles' -const AppSwitch = ({ onToggle, text, value, trackColor, disabled }) => { +const AppSwitch = ({ onToggle, text, value, disabled }) => { + const trackColor = { true: Colors.turquoiseDark } return ( @@ -27,7 +28,6 @@ AppSwitch.propTypes = { onToggle: PropTypes.func.isRequired, text: PropTypes.string, value: PropTypes.bool, - trackColor: PropTypes.string, disabled: PropTypes.bool, } diff --git a/components/settings/customization/index.js b/components/settings/customization/index.js index a8e0ab2..136e8f1 100644 --- a/components/settings/customization/index.js +++ b/components/settings/customization/index.js @@ -25,7 +25,6 @@ import { periodPredictionObservable, useCervixObservable, } from '../../../local-storage' -import { Colors } from '../../../styles' import labels from '../../../i18n/en/settings' import { SYMPTOMS } from '../../../config' @@ -121,37 +120,31 @@ const Settings = () => { onToggle={temperatureTrackingCategoryToggle} text={SYMPTOMS[1]} value={isTemperatureTrackingCategoryEnabled} - trackColor={{ true: Colors.turquoiseDark }} /> @@ -160,7 +153,6 @@ const Settings = () => { onToggle={toggleSwitch} text={'If turned on ...'} value={isEnabled} - trackColor={{ true: Colors.turquoiseDark }} /> @@ -185,7 +177,6 @@ const Settings = () => { onToggle={onCervixToggle} text={cervixText} value={shouldUseCervix} - trackColor={{ true: Colors.turquoiseDark }} /> )} {!isTemperatureTrackingCategoryEnabled && ( @@ -199,7 +190,6 @@ const Settings = () => { onToggle={onPeriodPredictionToggle} text={periodPredictionText} value={isPeriodPredictionEnabled} - trackColor={{ true: Colors.turquoiseDark }} /> From 4921aca3c3129f5be35811d4034e13b53759a827 Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Thu, 22 Feb 2024 13:32:58 +0100 Subject: [PATCH 2/2] Bring back prettierrc as before --- .prettierrc.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.prettierrc.js b/.prettierrc.js index 2b54074..3f714ac 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,7 +1,4 @@ module.exports = { - arrowParens: 'avoid', - bracketSameLine: true, - bracketSpacing: false, singleQuote: true, - trailingComma: 'all', -}; + semi: false, +}