From e9b99c3a154dccbc998c8f4b26ae6344c3672944 Mon Sep 17 00:00:00 2001 From: majakomel Date: Fri, 20 Oct 2023 14:41:41 +0200 Subject: [PATCH] Lint fixes --- renderer/components/Sidebar.js | 2 +- renderer/components/onboard/Sections.js | 5 +--- renderer/components/settings/widgets.js | 34 ++++++++++++------------- renderer/components/utils.js | 3 ++- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/renderer/components/Sidebar.js b/renderer/components/Sidebar.js index fe2457ec..1a37fc46 100644 --- a/renderer/components/Sidebar.js +++ b/renderer/components/Sidebar.js @@ -158,7 +158,7 @@ Sidebar.propTypes = { children: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.element), PropTypes.element -]) + ]) } export default Sidebar diff --git a/renderer/components/onboard/Sections.js b/renderer/components/onboard/Sections.js index c54ea83c..54ae785e 100644 --- a/renderer/components/onboard/Sections.js +++ b/renderer/components/onboard/Sections.js @@ -26,7 +26,6 @@ import { Flex, Heading } from 'ooni-components' -import NLink from 'next/link' import FormattedMarkdownMessage from '../FormattedMarkdownMessage' import ExternalLink from '../ExternalLink' @@ -92,9 +91,7 @@ const SectionThingsToKnow = ({onNext, quizActive, quizComplete, toggleQuiz, onQu - - - + diff --git a/renderer/components/settings/widgets.js b/renderer/components/settings/widgets.js index 11c46b08..02192c60 100644 --- a/renderer/components/settings/widgets.js +++ b/renderer/components/settings/widgets.js @@ -1,31 +1,31 @@ import React, { useCallback, useEffect, useState } from 'react' import PropTypes from 'prop-types' import { - Box, - Label, + // Box, + // Label, Checkbox, Input, } from 'ooni-components' -import styled from 'styled-components' +// import styled from 'styled-components' import log from 'electron-log/renderer' import { useConfig } from './useConfig' import { FormattedMessage } from 'react-intl' -const StyledLabel = styled(Label)` - color: ${props => props.disabled ? props.theme.colors.gray6 : 'inherited'}; - cursor: ${props => props.disabled ? 'not-allowed' : 'inherited'}; - & input,select,option { - color: ${props => props.disabled ? props.theme.colors.gray6 : 'inherited'}; - cursor: ${props => props.disabled ? 'not-allowed' : 'inherited'}; - } -` - -const StyledErrorMessage = styled(Box).attrs({ - fontSize: '10px' -})` - color: ${props => props.theme.colors.red5}; -` +// const StyledLabel = styled(Label)` +// color: ${props => props.disabled ? props.theme.colors.gray6 : 'inherited'}; +// cursor: ${props => props.disabled ? 'not-allowed' : 'inherited'}; +// & input,select,option { +// color: ${props => props.disabled ? props.theme.colors.gray6 : 'inherited'}; +// cursor: ${props => props.disabled ? 'not-allowed' : 'inherited'}; +// } +// ` + +// const StyledErrorMessage = styled(Box).attrs({ +// fontSize: '10px' +// })` +// color: ${props => props.theme.colors.red5}; +// ` export const BooleanOption = ({ label, optionKey, disabled = false, onChange, ...rest }) => { const [checked, setConfigValue] = useConfig(optionKey) diff --git a/renderer/components/utils.js b/renderer/components/utils.js index 46b8a7a4..defdc36b 100644 --- a/renderer/components/utils.js +++ b/renderer/components/utils.js @@ -1,6 +1,7 @@ import log from 'electron-log/renderer' -export const openInBrowser = (url, event) => { +// export const openInBrowser = (url, event) => { +export const openInBrowser = () => { // var shell = require('shell') // event.preventDefault() // shell.openExternal(url)