From 96f16352a6f88284c0fb0f1e3484047652b3208f Mon Sep 17 00:00:00 2001 From: David Ralph Date: Fri, 5 Jan 2024 12:33:52 +0000 Subject: [PATCH] refactor: remove lots of unused/unfinished code, change vite to mjs --- package.json | 1 - pnpm-lock.yaml | 3 - .../helpers/autocomplete/Autocomplete.jsx | 8 - src/components/helpers/carousel/Carousel.jsx | 5 - src/components/helpers/preview/Preview.jsx | 5 - .../helpers/sharemodal/ShareModal.jsx | 6 - src/components/helpers/tooltip/Tooltip.jsx | 9 - .../helpers/tooltip/infoTooltip.jsx | 59 ------- src/components/helpers/tooltip/tooltip.scss | 49 ------ src/components/modals/ErrorBoundary.jsx | 5 - src/components/modals/main/Main.jsx | 5 - .../modals/main/marketplace/Item.jsx | 8 - .../modals/main/marketplace/Items.jsx | 11 -- .../modals/main/marketplace/Lightbox.jsx | 6 - .../main/marketplace/SideloadFailedModal.jsx | 6 - .../main/marketplace/sections/Marketplace.jsx | 5 - .../modals/main/scss/marketplace/_main.scss | 113 ------------ .../scss/marketplace/modules/_featured.scss | 24 --- .../main/scss/marketplace/modules/_item.scss | 34 ---- .../modals/main/scss/settings/_main.scss | 42 +---- .../scss/settings/modules/_resetmodal.scss | 0 .../modals/main/settings/Checkbox.jsx | 10 -- .../modals/main/settings/ChipSelect.jsx | 7 - .../modals/main/settings/Dropdown.jsx | 13 -- .../modals/main/settings/FileUpload.jsx | 8 - .../modals/main/settings/Header.jsx | 13 -- src/components/modals/main/settings/Radio.jsx | 16 -- .../modals/main/settings/ResetModal.jsx | 5 - .../modals/main/settings/SettingsItem.jsx | 8 - .../modals/main/settings/Slider.jsx | 13 -- .../modals/main/settings/Switch.jsx | 9 - src/components/modals/main/settings/Text.jsx | 12 -- .../main/settings/sections/Advanced.jsx | 2 +- .../settings/sections/advanced/Advanced.jsx | 161 ------------------ .../main/settings/sections/advanced/Data.jsx | 64 ------- .../sections/background/CustomURLModal.jsx | 7 - .../settings/sections/quicklinks/AddModal.jsx | 11 -- src/components/modals/main/tabs/Addons.jsx | 5 - .../modals/main/tabs/Marketplace.jsx | 5 - src/components/modals/main/tabs/Settings.jsx | 7 +- .../modals/main/tabs/backend/Tab.jsx | 8 - .../modals/main/tabs/backend/Tabs.jsx | 12 -- src/components/modals/welcome/ProgressBar.jsx | 7 - src/components/modals/welcome/Welcome.jsx | 6 - .../modals/welcome/WelcomeSections.jsx | 6 - .../widgets/background/ExcludeModal.jsx | 6 - .../widgets/background/Favourite.jsx | 7 - .../widgets/background/Maximise.jsx | 5 - .../widgets/background/PhotoInformation.jsx | 7 - src/components/widgets/navbar/Navbar.jsx | 5 - src/components/widgets/navbar/Notes.jsx | 9 - src/components/widgets/navbar/Todo.jsx | 9 - src/components/widgets/weather/Expanded.jsx | 7 - .../widgets/weather/WeatherIcon.jsx | 5 - .../widgets/weather/WindDirectionIcon.jsx | 5 - src/components/widgets/weather/weather.scss | 35 ---- vite.config.js => vite.config.mjs | 0 57 files changed, 3 insertions(+), 916 deletions(-) delete mode 100644 src/components/helpers/tooltip/infoTooltip.jsx delete mode 100644 src/components/modals/main/scss/marketplace/modules/_featured.scss delete mode 100644 src/components/modals/main/scss/settings/modules/_resetmodal.scss delete mode 100644 src/components/modals/main/settings/sections/advanced/Advanced.jsx delete mode 100644 src/components/modals/main/settings/sections/advanced/Data.jsx rename vite.config.js => vite.config.mjs (100%) diff --git a/package.json b/package.json index 99fa522d..0e74e8e4 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "embla-carousel-react": "8.0.0-rc18", "fast-blurhash": "^1.1.2", "image-conversion": "^2.1.1", - "prop-types": "^15.8.1", "react": "^18.2.0", "react-clock": "4.6.0", "react-dom": "^18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c24fae69..544710b7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,9 +47,6 @@ dependencies: image-conversion: specifier: ^2.1.1 version: 2.1.1 - prop-types: - specifier: ^15.8.1 - version: 15.8.1 react: specifier: ^18.2.0 version: 18.2.0 diff --git a/src/components/helpers/autocomplete/Autocomplete.jsx b/src/components/helpers/autocomplete/Autocomplete.jsx index 841fb47d..cd90b008 100644 --- a/src/components/helpers/autocomplete/Autocomplete.jsx +++ b/src/components/helpers/autocomplete/Autocomplete.jsx @@ -1,5 +1,4 @@ import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import EventBus from 'modules/helpers/eventbus'; @@ -93,11 +92,4 @@ class Autocomplete extends PureComponent { } } -Autocomplete.propTypes = { - suggestions: PropTypes.arrayOf(PropTypes.string).isRequired, - onChange: PropTypes.func.isRequired, - onClick: PropTypes.func.isRequired, - placeholder: PropTypes.string, -}; - export default Autocomplete; diff --git a/src/components/helpers/carousel/Carousel.jsx b/src/components/helpers/carousel/Carousel.jsx index 6d6101ce..2ff9d8f3 100644 --- a/src/components/helpers/carousel/Carousel.jsx +++ b/src/components/helpers/carousel/Carousel.jsx @@ -1,5 +1,4 @@ import React, { useState, useEffect, useCallback, useRef, memo } from 'react'; -import PropTypes from 'prop-types'; import { MdOutlineArrowForwardIos, MdOutlineArrowBackIos } from 'react-icons/md'; import useEmblaCarousel from 'embla-carousel-react'; import Autoplay from 'embla-carousel-autoplay'; @@ -78,8 +77,4 @@ function EmblaCarousel({ data }) { ); } -EmblaCarousel.propTypes = { - data: PropTypes.arrayOf(PropTypes.object).isRequired, -}; - export default memo(EmblaCarousel); diff --git a/src/components/helpers/preview/Preview.jsx b/src/components/helpers/preview/Preview.jsx index a88ba044..e5789d8a 100644 --- a/src/components/helpers/preview/Preview.jsx +++ b/src/components/helpers/preview/Preview.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; import variables from 'modules/variables'; import './preview.scss'; @@ -15,8 +14,4 @@ function Preview(props) { ); } -Preview.propTypes = { - setup: PropTypes.func.isRequired, -}; - export default memo(Preview); diff --git a/src/components/helpers/sharemodal/ShareModal.jsx b/src/components/helpers/sharemodal/ShareModal.jsx index a2a1f3bf..05a77f4c 100644 --- a/src/components/helpers/sharemodal/ShareModal.jsx +++ b/src/components/helpers/sharemodal/ShareModal.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; import variables from 'modules/variables'; import { MdClose, MdEmail, MdContentCopy } from 'react-icons/md'; import { FaTwitter, FaFacebookF } from 'react-icons/fa'; @@ -124,9 +123,4 @@ function ShareModal({ modalClose, data }) { ); } -ShareModal.propTypes = { - modalClose: PropTypes.func.isRequired, - data: PropTypes.string.isRequired, -}; - export default memo(ShareModal); diff --git a/src/components/helpers/tooltip/Tooltip.jsx b/src/components/helpers/tooltip/Tooltip.jsx index 57fe1709..40c6b87c 100644 --- a/src/components/helpers/tooltip/Tooltip.jsx +++ b/src/components/helpers/tooltip/Tooltip.jsx @@ -1,5 +1,4 @@ import { useState, memo } from 'react'; -import PropTypes from 'prop-types'; import { useFloating, flip, offset, shift } from '@floating-ui/react-dom'; import './tooltip.scss'; @@ -48,12 +47,4 @@ function Tooltip({ children, title, style, placement, subtitle }) { ); } -Tooltip.propTypes = { - children: PropTypes.node.isRequired, - title: PropTypes.string.isRequired, - style: PropTypes.object, - placement: PropTypes.string, - subtitle: PropTypes.string.isRequired, -}; - export default memo(Tooltip); diff --git a/src/components/helpers/tooltip/infoTooltip.jsx b/src/components/helpers/tooltip/infoTooltip.jsx deleted file mode 100644 index cfbd0f86..00000000 --- a/src/components/helpers/tooltip/infoTooltip.jsx +++ /dev/null @@ -1,59 +0,0 @@ -import variables from 'modules/variables'; -import { useState, memo } from 'react'; -import PropTypes from 'prop-types'; -import { useFloating, flip, offset, shift } from '@floating-ui/react-dom'; -import { MdClose, MdInfo, MdOpenInNew } from 'react-icons/md'; -import Tooltip from './Tooltip'; - -import './tooltip.scss'; - -function InfoTooltip({ title, style, placement, subtitle }) { - const [showTooltip, setShowTooltip] = useState(false); - const [reference, setReference] = useState(null); - const { x, y, refs, strategy } = useFloating({ - placement: placement || 'top-start', - middleware: [flip(), offset(10), shift()], - elements: { - reference, - }, - }); - - return ( -
- setShowTooltip(true)} /> - {showTooltip && ( -
-
- {title} - -
setShowTooltip(false)}> - -
-
-
- {subtitle} - - {variables.getMessage('modals.main.settings.open_knowledgebase')} - -
- )} -
- ); -} - -InfoTooltip.propTypes = { - title: PropTypes.string.isRequired, - style: PropTypes.object, - placement: PropTypes.string, - subtitle: PropTypes.string.isRequired, -}; - -export default memo(InfoTooltip); diff --git a/src/components/helpers/tooltip/tooltip.scss b/src/components/helpers/tooltip/tooltip.scss index fbcedae7..e13591ac 100644 --- a/src/components/helpers/tooltip/tooltip.scss +++ b/src/components/helpers/tooltip/tooltip.scss @@ -96,52 +96,3 @@ } } } - -.infoTooltipTitle { - min-width: 200px; - position: absolute; - z-index: 1; - cursor: initial; - user-select: none; - opacity: 1; - text-align: left; - padding: 25px; - display: flex; - justify-content: center; - flex-flow: column; - gap: 10px; - - @include themed { - background-color: t($modal-background); - border-radius: t($borderRadius); - box-shadow: 0 0 0 1px t($modal-sidebarActive); - } - - .tooltipHeader { - display: flex; - flex-flow: row; - align-items: center; - gap: 25px; - } - - .link { - display: flex; - gap: 10px; - align-items: center; - } - - .close { - font-size: 20px; - padding: 15px; - place-items: center; - display: grid; - cursor: pointer; - - &:hover { - @include themed { - background: t($modal-sidebar); - border-radius: t($borderRadius); - } - } - } -} diff --git a/src/components/modals/ErrorBoundary.jsx b/src/components/modals/ErrorBoundary.jsx index a6448f3a..07a1edf2 100644 --- a/src/components/modals/ErrorBoundary.jsx +++ b/src/components/modals/ErrorBoundary.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { MdErrorOutline } from 'react-icons/md'; import { captureException } from '@sentry/react'; @@ -71,8 +70,4 @@ class ErrorBoundary extends PureComponent { } } -ErrorBoundary.propTypes = { - children: PropTypes.node.isRequired, -}; - export default ErrorBoundary; diff --git a/src/components/modals/main/Main.jsx b/src/components/modals/main/Main.jsx index 669baece..d2d25aa8 100644 --- a/src/components/modals/main/Main.jsx +++ b/src/components/modals/main/Main.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { Suspense, lazy, useState, memo } from 'react'; -import PropTypes from 'prop-types'; import { MdClose } from 'react-icons/md'; @@ -69,8 +68,4 @@ function MainModal({ modalClose }) { ); } -MainModal.propTypes = { - modalClose: PropTypes.func.isRequired, -}; - export default memo(MainModal); diff --git a/src/components/modals/main/marketplace/Item.jsx b/src/components/modals/main/marketplace/Item.jsx index c6e4d292..daa360fc 100644 --- a/src/components/modals/main/marketplace/Item.jsx +++ b/src/components/modals/main/marketplace/Item.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent, Fragment } from 'react'; -import PropTypes from 'prop-types'; import Tooltip from 'components/helpers/tooltip/Tooltip'; import ImageCarousel from 'components/helpers/carousel/Carousel'; import { toast } from 'react-toastify'; @@ -335,11 +334,4 @@ class Item extends PureComponent { } } -Item.propTypes = { - data: PropTypes.object, - addonInstalled: PropTypes.bool, - addonInstalledVersion: PropTypes.string, - toggleFunction: PropTypes.func, -}; - export default Item; diff --git a/src/components/modals/main/marketplace/Items.jsx b/src/components/modals/main/marketplace/Items.jsx index 4815991f..b56c8145 100644 --- a/src/components/modals/main/marketplace/Items.jsx +++ b/src/components/modals/main/marketplace/Items.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import React, { memo } from 'react'; -import PropTypes from 'prop-types'; import { MdAutoFixHigh, MdOutlineArrowForward, MdOutlineOpenInNew } from 'react-icons/md'; function Items({ @@ -113,14 +112,4 @@ function Items({ ); } -Items.propTypes = { - type: PropTypes.string.isRequired, - items: PropTypes.arrayOf(PropTypes.object).isRequired, - collection: PropTypes.object, - toggleFunction: PropTypes.func.isRequired, - collectionFunction: PropTypes.func.isRequired, - onCollection: PropTypes.bool.isRequired, - filter: PropTypes.string, -}; - export default memo(Items); diff --git a/src/components/modals/main/marketplace/Lightbox.jsx b/src/components/modals/main/marketplace/Lightbox.jsx index fa9944a0..07631e2c 100644 --- a/src/components/modals/main/marketplace/Lightbox.jsx +++ b/src/components/modals/main/marketplace/Lightbox.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; import variables from 'modules/variables'; function Lightbox({ modalClose, img }) { @@ -15,9 +14,4 @@ function Lightbox({ modalClose, img }) { ); } -Lightbox.propTypes = { - modalClose: PropTypes.func.isRequired, - img: PropTypes.string.isRequired, -}; - export default memo(Lightbox); diff --git a/src/components/modals/main/marketplace/SideloadFailedModal.jsx b/src/components/modals/main/marketplace/SideloadFailedModal.jsx index a561c7cd..567c6325 100644 --- a/src/components/modals/main/marketplace/SideloadFailedModal.jsx +++ b/src/components/modals/main/marketplace/SideloadFailedModal.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; import variables from 'modules/variables'; import { MdClose } from 'react-icons/md'; import Tooltip from 'components/helpers/tooltip/Tooltip'; @@ -23,9 +22,4 @@ function SideloadFailedModal({ modalClose, reason }) { ); } -SideloadFailedModal.propTypes = { - modalClose: PropTypes.func.isRequired, - reason: PropTypes.string.isRequired, -}; - export default memo(SideloadFailedModal); diff --git a/src/components/modals/main/marketplace/sections/Marketplace.jsx b/src/components/modals/main/marketplace/sections/Marketplace.jsx index 7120bec4..27bbf515 100644 --- a/src/components/modals/main/marketplace/sections/Marketplace.jsx +++ b/src/components/modals/main/marketplace/sections/Marketplace.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { toast } from 'react-toastify'; import { MdWifiOff, @@ -451,8 +450,4 @@ class Marketplace extends PureComponent { } } -Marketplace.propTypes = { - type: PropTypes.string, -}; - export default Marketplace; diff --git a/src/components/modals/main/scss/marketplace/_main.scss b/src/components/modals/main/scss/marketplace/_main.scss index 1c41f5e4..e4b183ef 100644 --- a/src/components/modals/main/scss/marketplace/_main.scss +++ b/src/components/modals/main/scss/marketplace/_main.scss @@ -1,7 +1,6 @@ // this file is too long @import 'modules/item'; @import 'modules/buttons'; -@import 'modules/featured'; @import 'modules/lightbox'; @import 'scss/variables'; @@ -184,64 +183,6 @@ } } -.tags { - display: flex; - flex-flow: row; - flex-wrap: wrap; - gap: 15px; - align-items: center; -} - -.tag { - padding: 2px 10px; - border-radius: 12px; - font-size: 12px; - display: grid; - place-items: center; - - @include themed { - background: t($modal-sidebar); - box-shadow: 0 0 0 3px t($modal-sidebarActive); - - span { - &::before { - content: '#'; - color: t($subColor); - margin-right: 5px; - } - } - - &:hover { - background: t($modal-sidebarActive); - } - } -} - -.moreTag { - padding: 2px 10px; - border-radius: 12px; - font-size: 12px; - display: grid; - place-items: center; - - @include themed { - background: t($modal-sidebar); - box-shadow: 0 0 0 3px t($modal-sidebarActive); - - span { - &::before { - content: '+'; - color: t($subColor); - margin-right: 5px; - } - } - - &:hover { - background: t($modal-sidebarActive); - } - } -} - .emptyItems { width: 100%; height: 100%; @@ -355,35 +296,6 @@ p.author { } } -.itemWarning { - display: flex; - flex-direction: column; - align-items: center; - - @include themed { - background: t($modal-sidebar); - box-shadow: 0 0 0 4px t($modal-sidebarActive); - border-radius: t($borderRadius); - padding: 15px; - } - - .topRow { - display: flex; - flex-flow: column; - align-items: center; - } - - .subtitle { - text-align: justify; - } -} - -.truncate { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - .filter { display: flex; flex-flow: row; @@ -529,31 +441,6 @@ a.collectionButton { } } -.smallBanner { - button { - padding: 0 15px; - } - - display: flex; - justify-content: space-between; - padding: 15px; - margin-top: 15px; - align-items: center; - - @include themed { - box-shadow: 0 0 0 4px t($modal-sidebarActive); - border-radius: t($borderRadius); - background: t($modal-sidebar); - } - - .content { - display: flex; - flex-flow: column; - gap: 15px; - max-width: 250px; - } -} - .marketplaceRefresh { display: flex; flex-flow: row; diff --git a/src/components/modals/main/scss/marketplace/modules/_featured.scss b/src/components/modals/main/scss/marketplace/modules/_featured.scss deleted file mode 100644 index ab77d966..00000000 --- a/src/components/modals/main/scss/marketplace/modules/_featured.scss +++ /dev/null @@ -1,24 +0,0 @@ -.featured { - border-radius: 15px; - padding: 50px; - color: #fff; - width: calc(100% - 6rem); - margin-top: 13px; - - button { - float: left; - margin-top: -7px; - border: 2px solid map-get($theme-colours, 'main'); - color: map-get($theme-colours, 'main'); - - &:hover { - background: map-get($theme-colours, 'main'); - color: #2d3436; - } - } - - h1 { - margin-top: -20px; - font-size: 2rem; - } -} diff --git a/src/components/modals/main/scss/marketplace/modules/_item.scss b/src/components/modals/main/scss/marketplace/modules/_item.scss index fc234ec9..29b1eab0 100644 --- a/src/components/modals/main/scss/marketplace/modules/_item.scss +++ b/src/components/modals/main/scss/marketplace/modules/_item.scss @@ -8,11 +8,6 @@ p.description { max-width: 800px; } -.informationContainer { - margin-top: 150px; - position: absolute; -} - .moreInfo { display: flex; justify-content: space-between; @@ -63,35 +58,6 @@ p.description { } } -.itemTitle { - font-size: 38px; - font-weight: 600; - - @include themed { - color: t($color); - } -} - -.titleTop { - display: flex; - flex-flow: column; - gap: 3px; -} - -.showMore { - display: flex; - align-items: center; - gap: 5px; - transition: 0.5s; - cursor: pointer; - - @include themed { - &:hover { - color: t($subColor); - } - } -} - .showMoreItems { display: flex; flex-flow: column; diff --git a/src/components/modals/main/scss/settings/_main.scss b/src/components/modals/main/scss/settings/_main.scss index 7c2a5b44..a0f6cf99 100644 --- a/src/components/modals/main/scss/settings/_main.scss +++ b/src/components/modals/main/scss/settings/_main.scss @@ -1,5 +1,5 @@ -@import 'modules/resetmodal'; @import 'scss/variables'; + @import 'modules/material-ui'; @import 'modules/tabs/about'; @import 'modules/tabs/changelog'; @@ -164,46 +164,6 @@ h4 { } } -.breadcrumb { - display: flex; - flex-flow: row; - padding-top: 20px; - gap: 10px; - align-items: center; - - .settingsReturn { - border-radius: 12px; - cursor: pointer; - padding: 4px; - - svg { - font-size: 2em; - } - - &:hover { - background: rgb(121 121 121 / 22.6%); - } - } - - .returnButton { - display: grid; - place-items: center; - width: 48px; - height: 48px; - border-radius: 12px; - cursor: pointer; - margin-right: 25px; - - svg { - font-size: 2em; - } - - &:hover { - background: rgb(121 121 121 / 22.6%); - } - } -} - .achievements { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); diff --git a/src/components/modals/main/scss/settings/modules/_resetmodal.scss b/src/components/modals/main/scss/settings/modules/_resetmodal.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/components/modals/main/settings/Checkbox.jsx b/src/components/modals/main/settings/Checkbox.jsx index 0384e0ba..539857fb 100644 --- a/src/components/modals/main/settings/Checkbox.jsx +++ b/src/components/modals/main/settings/Checkbox.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { Checkbox as CheckboxUI, FormControlLabel } from '@mui/material'; import EventBus from 'modules/helpers/eventbus'; @@ -59,13 +58,4 @@ class Checkbox extends PureComponent { } } -Checkbox.propTypes = { - name: PropTypes.string.isRequired, - text: PropTypes.string.isRequired, - category: PropTypes.string, - element: PropTypes.string, - onChange: PropTypes.func, - disabled: PropTypes.bool, -}; - export default Checkbox; diff --git a/src/components/modals/main/settings/ChipSelect.jsx b/src/components/modals/main/settings/ChipSelect.jsx index 6ef2e735..21eace0a 100644 --- a/src/components/modals/main/settings/ChipSelect.jsx +++ b/src/components/modals/main/settings/ChipSelect.jsx @@ -1,5 +1,4 @@ import { useState, memo } from 'react'; -import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; import OutlinedInput from '@mui/material/OutlinedInput'; @@ -55,10 +54,4 @@ function ChipSelect({ label, options, name }) { ); } -ChipSelect.propTypes = { - label: PropTypes.string, - options: PropTypes.array, - name: PropTypes.string, -}; - export default memo(ChipSelect); diff --git a/src/components/modals/main/settings/Dropdown.jsx b/src/components/modals/main/settings/Dropdown.jsx index 06e0e333..09a8d4b1 100644 --- a/src/components/modals/main/settings/Dropdown.jsx +++ b/src/components/modals/main/settings/Dropdown.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent, createRef } from 'react'; -import PropTypes from 'prop-types'; import { InputLabel, MenuItem, FormControl, Select } from '@mui/material'; import EventBus from 'modules/helpers/eventbus'; @@ -80,16 +79,4 @@ class Dropdown extends PureComponent { } } -Dropdown.propTypes = { - name: PropTypes.string.isRequired, - label: PropTypes.string, - category: PropTypes.string, - element: PropTypes.string, - onChange: PropTypes.func, - noSetting: PropTypes.bool, - manual: PropTypes.bool, - value2: PropTypes.string, - name2: PropTypes.string, -}; - export default Dropdown; diff --git a/src/components/modals/main/settings/FileUpload.jsx b/src/components/modals/main/settings/FileUpload.jsx index 6d26c9cc..7b06478a 100644 --- a/src/components/modals/main/settings/FileUpload.jsx +++ b/src/components/modals/main/settings/FileUpload.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { toast } from 'react-toastify'; import { compressAccurately, filetoDataURL } from 'image-conversion'; import { videoCheck } from 'modules/helpers/background/widget'; @@ -63,11 +62,4 @@ class FileUpload extends PureComponent { } } -FileUpload.propTypes = { - id: PropTypes.string.isRequired, - type: PropTypes.string.isRequired, - loadFunction: PropTypes.func.isRequired, - accept: PropTypes.string, -}; - export default FileUpload; diff --git a/src/components/modals/main/settings/Header.jsx b/src/components/modals/main/settings/Header.jsx index a835e689..cfb088d6 100644 --- a/src/components/modals/main/settings/Header.jsx +++ b/src/components/modals/main/settings/Header.jsx @@ -1,7 +1,6 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { /*MdHelpOutline,*/ MdFlag, MdArrowBack, @@ -115,16 +114,4 @@ class Header extends PureComponent { } } -Header.propTypes = { - title: PropTypes.string.isRequired, - setting: PropTypes.string.isRequired, - category: PropTypes.string.isRequired, - element: PropTypes.string, - backButton: PropTypes.bool, - clickEffect: PropTypes.func, - switch: PropTypes.bool, - zoomSetting: PropTypes.string, - zoomCategory: PropTypes.string, -}; - export default Header; diff --git a/src/components/modals/main/settings/Radio.jsx b/src/components/modals/main/settings/Radio.jsx index 292950ba..22453cb7 100644 --- a/src/components/modals/main/settings/Radio.jsx +++ b/src/components/modals/main/settings/Radio.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { Radio as RadioUI, RadioGroup, @@ -85,19 +84,4 @@ class Radio extends PureComponent { } } -Radio.propTypes = { - name: PropTypes.string.isRequired, - title: PropTypes.string.isRequired, - options: PropTypes.arrayOf( - PropTypes.shape({ - name: PropTypes.string.isRequired, - value: PropTypes.string.isRequired, - }), - ).isRequired, - onChange: PropTypes.func, - category: PropTypes.string, - element: PropTypes.string, - smallTitle: PropTypes.bool, -}; - export default Radio; diff --git a/src/components/modals/main/settings/ResetModal.jsx b/src/components/modals/main/settings/ResetModal.jsx index 157876ed..bc88c0da 100644 --- a/src/components/modals/main/settings/ResetModal.jsx +++ b/src/components/modals/main/settings/ResetModal.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; import variables from 'modules/variables'; import { MdClose, MdRestartAlt } from 'react-icons/md'; import { setDefaultSettings } from 'modules/helpers/settings'; @@ -46,8 +45,4 @@ function ResetModal({ modalClose }) { ); } -ResetModal.propTypes = { - modalClose: PropTypes.func.isRequired, -}; - export default memo(ResetModal); diff --git a/src/components/modals/main/settings/SettingsItem.jsx b/src/components/modals/main/settings/SettingsItem.jsx index 7dad66f8..ddbd3798 100644 --- a/src/components/modals/main/settings/SettingsItem.jsx +++ b/src/components/modals/main/settings/SettingsItem.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; function SettingsItem({ final, title, subtitle, children }) { return ( @@ -13,11 +12,4 @@ function SettingsItem({ final, title, subtitle, children }) { ); } -SettingsItem.propTypes = { - title: PropTypes.string.isRequired, - subtitle: PropTypes.string.isRequired, - children: PropTypes.node.isRequired, - final: PropTypes.bool, -}; - export default memo(SettingsItem); diff --git a/src/components/modals/main/settings/Slider.jsx b/src/components/modals/main/settings/Slider.jsx index b3fd5fed..8f988dd6 100644 --- a/src/components/modals/main/settings/Slider.jsx +++ b/src/components/modals/main/settings/Slider.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { toast } from 'react-toastify'; import { Slider } from '@mui/material'; import { MdRefresh } from 'react-icons/md'; @@ -86,16 +85,4 @@ class SliderComponent extends PureComponent { } } -SliderComponent.propTypes = { - name: PropTypes.string.isRequired, - title: PropTypes.string.isRequired, - default: PropTypes.number.isRequired, - min: PropTypes.number.isRequired, - max: PropTypes.number.isRequired, - step: PropTypes.number, - marks: PropTypes.array, - element: PropTypes.string, - category: PropTypes.string, -}; - export default SliderComponent; diff --git a/src/components/modals/main/settings/Switch.jsx b/src/components/modals/main/settings/Switch.jsx index 2692e11e..b8ac4dec 100644 --- a/src/components/modals/main/settings/Switch.jsx +++ b/src/components/modals/main/settings/Switch.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { Switch as SwitchUI, FormControlLabel } from '@mui/material'; import EventBus from 'modules/helpers/eventbus'; @@ -54,12 +53,4 @@ class Switch extends PureComponent { } } -Switch.propTypes = { - name: PropTypes.string.isRequired, - text: PropTypes.string.isRequired, - category: PropTypes.string, - element: PropTypes.string, - header: PropTypes.bool, -}; - export default Switch; diff --git a/src/components/modals/main/settings/Text.jsx b/src/components/modals/main/settings/Text.jsx index a38c4132..97647130 100644 --- a/src/components/modals/main/settings/Text.jsx +++ b/src/components/modals/main/settings/Text.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { toast } from 'react-toastify'; import { TextField } from '@mui/material'; @@ -79,15 +78,4 @@ class Text extends PureComponent { } } -Text.propTypes = { - title: PropTypes.string.isRequired, - name: PropTypes.string.isRequired, - category: PropTypes.string.isRequired, - default: PropTypes.string, - element: PropTypes.string, - customcss: PropTypes.bool, - textarea: PropTypes.bool, - upperCaseFirst: PropTypes.bool, -}; - export default Text; diff --git a/src/components/modals/main/settings/sections/Advanced.jsx b/src/components/modals/main/settings/sections/Advanced.jsx index 6b85f9ad..87e7a0a6 100644 --- a/src/components/modals/main/settings/sections/Advanced.jsx +++ b/src/components/modals/main/settings/sections/Advanced.jsx @@ -102,7 +102,7 @@ export default class AdvancedSettings extends PureComponent { 'modals.main.settings.sections.advanced.custom_css_subtitle', )} > - + this.setState({ showData: false })} />; - }*/ - - return ( - <> - - {variables.getMessage('modals.main.settings.sections.advanced.title')} - - {/* {localStorage.getItem('welcomePreview') !== 'true' ? ( -
this.setState({ showData: true })}> -
- -
- - {variables.getMessage('modals.main.settings.sections.advanced.data')} - - - Sync, export, import etc your data. You have control, this is Mue. - -
-
-
- {' '} - -
-
- ) : null} */} - - - - {localStorage.getItem('welcomePreview') !== 'true' && ( -
-
- - {variables.getMessage('modals.main.settings.sections.advanced.data')} - - - {variables.getMessage('modals.main.settings.sections.advanced.data_subtitle')} - -
-
- - - -
-
- )} - - - - {variables.getMessage('modals.main.settings.sections.advanced.timezone.automatic')} - - {time_zones.map((timezone) => ( - - {timezone} - - ))} - - - - - - importSettings(e)} - /> - - - - - - - this.setState({ resetModal: false })} - isOpen={this.state.resetModal} - className="Modal resetmodal mainModal" - overlayClassName="Overlay resetoverlay" - ariaHideApp={false} - > - this.setState({ resetModal: false })} /> - - - ); - } -} diff --git a/src/components/modals/main/settings/sections/advanced/Data.jsx b/src/components/modals/main/settings/sections/advanced/Data.jsx deleted file mode 100644 index 800c1220..00000000 --- a/src/components/modals/main/settings/sections/advanced/Data.jsx +++ /dev/null @@ -1,64 +0,0 @@ -import variables from 'modules/variables'; -import SettingsItem from '../../SettingsItem'; -import { PureComponent } from 'react'; -import { - MdOutlineKeyboardArrowRight, - MdUpload as ImportIcon, - MdDownload as ExportIcon, - MdRestartAlt as ResetIcon, - MdOutlineSync, -} from 'react-icons/md'; - -export default class Data extends PureComponent { - render() { - return ( - <> - this.props.goBack()}> - {variables.getMessage('modals.main.settings.sections.advanced.title')} - Data - -
- - Sync - {/*Last synced at: Sun 10:12PM, 1st May 2022*/} - Sync is not setup yet. -
-
-
- - {variables.getMessage('modals.main.settings.sections.advanced.data')} - - - Choose whether to export your Mue settings to your computer, import an existing - settings file, or reset your settings to their default values. - -
-
- - - -
-
- - - ); - } -} diff --git a/src/components/modals/main/settings/sections/background/CustomURLModal.jsx b/src/components/modals/main/settings/sections/background/CustomURLModal.jsx index 704f5ce5..f779e7ca 100644 --- a/src/components/modals/main/settings/sections/background/CustomURLModal.jsx +++ b/src/components/modals/main/settings/sections/background/CustomURLModal.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { useState, memo } from 'react'; -import PropTypes from 'prop-types'; import { MdClose, MdOutlineAddLink } from 'react-icons/md'; import Tooltip from 'components/helpers/tooltip/Tooltip'; @@ -42,10 +41,4 @@ function CustomURLModal({ modalClose, urlError, modalCloseOnly }) { ); } -CustomURLModal.propTypes = { - modalClose: PropTypes.func.isRequired, - urlError: PropTypes.string.isRequired, - modalCloseOnly: PropTypes.func.isRequired, -}; - export default memo(CustomURLModal); diff --git a/src/components/modals/main/settings/sections/quicklinks/AddModal.jsx b/src/components/modals/main/settings/sections/quicklinks/AddModal.jsx index 09b432f2..e7ee19e4 100644 --- a/src/components/modals/main/settings/sections/quicklinks/AddModal.jsx +++ b/src/components/modals/main/settings/sections/quicklinks/AddModal.jsx @@ -1,7 +1,6 @@ import variables from 'modules/variables'; import { useState, memo } from 'react'; -import PropTypes from 'prop-types'; import { TextareaAutosize } from '@mui/material'; import { MdAddLink, MdClose } from 'react-icons/md'; import Tooltip from 'components/helpers/tooltip/Tooltip'; @@ -74,14 +73,4 @@ function AddModal({ urlError, iconError, addLink, closeModal, edit, editData, ed ); } -AddModal.propTypes = { - urlError: PropTypes.string.isRequired, - iconError: PropTypes.string.isRequired, - addLink: PropTypes.func.isRequired, - closeModal: PropTypes.func.isRequired, - edit: PropTypes.bool.isRequired, - editData: PropTypes.object.isRequired, - editLink: PropTypes.func.isRequired, -}; - export default memo(AddModal); diff --git a/src/components/modals/main/tabs/Addons.jsx b/src/components/modals/main/tabs/Addons.jsx index 3c7a9eca..9f548fda 100644 --- a/src/components/modals/main/tabs/Addons.jsx +++ b/src/components/modals/main/tabs/Addons.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { memo } from 'react'; -import PropTypes from 'prop-types'; import Tabs from './backend/Tabs'; import Added from '../marketplace/sections/Added'; @@ -19,8 +18,4 @@ function Addons(props) { ); } -Addons.propTypes = { - changeTab: PropTypes.func.isRequired, -}; - export default memo(Addons); diff --git a/src/components/modals/main/tabs/Marketplace.jsx b/src/components/modals/main/tabs/Marketplace.jsx index 9311509c..5876ed17 100644 --- a/src/components/modals/main/tabs/Marketplace.jsx +++ b/src/components/modals/main/tabs/Marketplace.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { memo } from 'react'; -import PropTypes from 'prop-types'; import Tabs from './backend/Tabs'; import MarketplaceTab from '../marketplace/sections/Marketplace'; @@ -30,8 +29,4 @@ function Marketplace(props) { ); } -Marketplace.propTypes = { - changeTab: PropTypes.func.isRequired, -}; - export default memo(Marketplace); diff --git a/src/components/modals/main/tabs/Settings.jsx b/src/components/modals/main/tabs/Settings.jsx index f1cfed91..94489c33 100644 --- a/src/components/modals/main/tabs/Settings.jsx +++ b/src/components/modals/main/tabs/Settings.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { memo } from 'react'; -import PropTypes from 'prop-types'; import Tabs from './backend/Tabs'; @@ -17,7 +16,7 @@ import Search from '../settings/sections/Search'; import Weather from '../settings/sections/Weather'; import Appearance from '../settings/sections/Appearance'; import Language from '../settings/sections/Language'; -import Advanced from '../settings/sections/advanced/Advanced'; +import Advanced from '../settings/sections/Advanced'; import Stats from '../settings/sections/Stats'; import Experimental from '../settings/sections/Experimental'; import Changelog from '../settings/sections/Changelog'; @@ -117,8 +116,4 @@ function Settings(props) { ); } -Settings.propTypes = { - changeTab: PropTypes.func.isRequired, -}; - export default memo(Settings); diff --git a/src/components/modals/main/tabs/backend/Tab.jsx b/src/components/modals/main/tabs/backend/Tab.jsx index 94776ee7..358cbd9a 100644 --- a/src/components/modals/main/tabs/backend/Tab.jsx +++ b/src/components/modals/main/tabs/backend/Tab.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { memo } from 'react'; -import PropTypes from 'prop-types'; import { MdSettings as Settings, MdWidgets as Addons, @@ -163,11 +162,4 @@ function Tab({ label, currentTab, onClick, navbarTab }) { ); } -Tab.propTypes = { - label: PropTypes.string.isRequired, - currentTab: PropTypes.string.isRequired, - onClick: PropTypes.func.isRequired, - navbarTab: PropTypes.bool, -}; - export default memo(Tab); diff --git a/src/components/modals/main/tabs/backend/Tabs.jsx b/src/components/modals/main/tabs/backend/Tabs.jsx index 92d6c565..abb401fa 100644 --- a/src/components/modals/main/tabs/backend/Tabs.jsx +++ b/src/components/modals/main/tabs/backend/Tabs.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { MdSettings, MdOutlineShoppingBasket, @@ -124,15 +123,4 @@ class Tabs extends PureComponent { } } -Tabs.propTypes = { - children: PropTypes.instanceOf(Array).isRequired, - current: PropTypes.string.isRequired, - changeTab: PropTypes.func.isRequired, - navbar: PropTypes.bool, -}; - -Tabs.defaultProps = { - navbar: false, -}; - export default Tabs; diff --git a/src/components/modals/welcome/ProgressBar.jsx b/src/components/modals/welcome/ProgressBar.jsx index 801513e7..f67dcc14 100644 --- a/src/components/modals/welcome/ProgressBar.jsx +++ b/src/components/modals/welcome/ProgressBar.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; function ProgressBar({ count, currentTab, switchTab }) { return ( @@ -18,10 +17,4 @@ function ProgressBar({ count, currentTab, switchTab }) { ); } -ProgressBar.propTypes = { - count: PropTypes.arrayOf(PropTypes.number).isRequired, - currentTab: PropTypes.number.isRequired, - switchTab: PropTypes.func.isRequired, -}; - export default memo(ProgressBar); diff --git a/src/components/modals/welcome/Welcome.jsx b/src/components/modals/welcome/Welcome.jsx index 71f03a81..59619d39 100644 --- a/src/components/modals/welcome/Welcome.jsx +++ b/src/components/modals/welcome/Welcome.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import EventBus from 'modules/helpers/eventbus'; @@ -147,9 +146,4 @@ class WelcomeModal extends PureComponent { } } -WelcomeModal.propTypes = { - modalClose: PropTypes.func.isRequired, - modalSkip: PropTypes.func.isRequired, -}; - export default WelcomeModal; diff --git a/src/components/modals/welcome/WelcomeSections.jsx b/src/components/modals/welcome/WelcomeSections.jsx index 22d07561..d9195f33 100644 --- a/src/components/modals/welcome/WelcomeSections.jsx +++ b/src/components/modals/welcome/WelcomeSections.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { MdCloudUpload, @@ -423,9 +422,4 @@ class WelcomeSections extends PureComponent { } } -WelcomeSections.propTypes = { - currentTab: PropTypes.number.isRequired, - switchTab: PropTypes.func.isRequired, -}; - export default WelcomeSections; diff --git a/src/components/widgets/background/ExcludeModal.jsx b/src/components/widgets/background/ExcludeModal.jsx index 39c6bb99..9a916671 100644 --- a/src/components/widgets/background/ExcludeModal.jsx +++ b/src/components/widgets/background/ExcludeModal.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { memo } from 'react'; -import PropTypes from 'prop-types'; import EventBus from 'modules/helpers/eventbus'; import Tooltip from 'components/helpers/tooltip/Tooltip'; import { MdClose, MdDone } from 'react-icons/md'; @@ -46,9 +45,4 @@ function ExcludeModal({ modalClose, info }) { ); } -ExcludeModal.propTypes = { - modalClose: PropTypes.func.isRequired, - info: PropTypes.object.isRequired, -}; - export default memo(ExcludeModal); diff --git a/src/components/widgets/background/Favourite.jsx b/src/components/widgets/background/Favourite.jsx index d725f1fa..ca2d2472 100644 --- a/src/components/widgets/background/Favourite.jsx +++ b/src/components/widgets/background/Favourite.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { MdStar, MdStarBorder } from 'react-icons/md'; class Favourite extends PureComponent { @@ -105,10 +104,4 @@ class Favourite extends PureComponent { } } -Favourite.propTypes = { - credit: PropTypes.string, - offline: PropTypes.bool, - pun: PropTypes.string, -}; - export default Favourite; diff --git a/src/components/widgets/background/Maximise.jsx b/src/components/widgets/background/Maximise.jsx index 0d0e560c..03485fad 100644 --- a/src/components/widgets/background/Maximise.jsx +++ b/src/components/widgets/background/Maximise.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent } from 'react'; -import PropTypes from 'prop-types'; import { MdCropFree } from 'react-icons/md'; @@ -88,8 +87,4 @@ class Maximise extends PureComponent { } } -Maximise.propTypes = { - fontSize: PropTypes.number, -}; - export default Maximise; diff --git a/src/components/widgets/background/PhotoInformation.jsx b/src/components/widgets/background/PhotoInformation.jsx index 0cfc5ec5..5efae880 100644 --- a/src/components/widgets/background/PhotoInformation.jsx +++ b/src/components/widgets/background/PhotoInformation.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { useState, memo } from 'react'; -import PropTypes from 'prop-types'; import Favourite from './Favourite'; import { MdInfo, @@ -386,10 +385,4 @@ function PhotoInformation({ info, url, api }) { ); } -PhotoInformation.propTypes = { - info: PropTypes.object.isRequired, - url: PropTypes.string.isRequired, - api: PropTypes.string.isRequired, -}; - export default memo(PhotoInformation); diff --git a/src/components/widgets/navbar/Navbar.jsx b/src/components/widgets/navbar/Navbar.jsx index dc01c7dd..e101f49c 100644 --- a/src/components/widgets/navbar/Navbar.jsx +++ b/src/components/widgets/navbar/Navbar.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent, createRef } from 'react'; -import PropTypes from 'prop-types'; import { MdRefresh, MdSettings } from 'react-icons/md'; @@ -155,8 +154,4 @@ class Navbar extends PureComponent { } } -Navbar.propTypes = { - openModal: PropTypes.func, -}; - export default Navbar; diff --git a/src/components/widgets/navbar/Notes.jsx b/src/components/widgets/navbar/Notes.jsx index 2f023817..11880812 100644 --- a/src/components/widgets/navbar/Notes.jsx +++ b/src/components/widgets/navbar/Notes.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent, memo, useState } from 'react'; -import PropTypes from 'prop-types'; import { MdContentCopy, MdAssignment, MdPushPin, MdDownload } from 'react-icons/md'; import { useFloating, shift } from '@floating-ui/react-dom'; @@ -170,12 +169,4 @@ function NotesWrapper() { ); } -Notes.propTypes = { - notesRef: PropTypes.object, - floatRef: PropTypes.object, - position: PropTypes.string, - xPosition: PropTypes.number, - yPosition: PropTypes.number, -}; - export default memo(NotesWrapper); diff --git a/src/components/widgets/navbar/Todo.jsx b/src/components/widgets/navbar/Todo.jsx index a98d8eb8..b961e7f6 100644 --- a/src/components/widgets/navbar/Todo.jsx +++ b/src/components/widgets/navbar/Todo.jsx @@ -1,6 +1,5 @@ import variables from 'modules/variables'; import { PureComponent, memo, useState } from 'react'; -import PropTypes from 'prop-types'; import { MdChecklist, @@ -248,12 +247,4 @@ function TodoWrapper() { ); } -Todo.propTypes = { - todoRef: PropTypes.object, - floatRef: PropTypes.object, - position: PropTypes.string, - xPosition: PropTypes.string, - yPosition: PropTypes.string, -}; - export default memo(TodoWrapper); diff --git a/src/components/widgets/weather/Expanded.jsx b/src/components/widgets/weather/Expanded.jsx index 2263a6ca..8db7e33e 100644 --- a/src/components/widgets/weather/Expanded.jsx +++ b/src/components/widgets/weather/Expanded.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; import { WiHumidity, WiWindy, WiBarometer, WiCloud } from 'react-icons/wi'; import { MdDisabledVisible } from 'react-icons/md'; @@ -116,10 +115,4 @@ function Expanded({ state, weatherType, variables }) { ); } -Expanded.propTypes = { - state: PropTypes.object.isRequired, - weatherType: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, - variables: PropTypes.object.isRequired, -}; - export default memo(Expanded); diff --git a/src/components/widgets/weather/WeatherIcon.jsx b/src/components/widgets/weather/WeatherIcon.jsx index 16b2047d..51bcf303 100644 --- a/src/components/widgets/weather/WeatherIcon.jsx +++ b/src/components/widgets/weather/WeatherIcon.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; import { WiDaySunny, @@ -54,8 +53,4 @@ function WeatherIcon({ name }) { } } -WeatherIcon.propTypes = { - name: PropTypes.string.isRequired, -}; - export default memo(WeatherIcon); diff --git a/src/components/widgets/weather/WindDirectionIcon.jsx b/src/components/widgets/weather/WindDirectionIcon.jsx index 36ffd5bd..05a9fc08 100644 --- a/src/components/widgets/weather/WindDirectionIcon.jsx +++ b/src/components/widgets/weather/WindDirectionIcon.jsx @@ -1,5 +1,4 @@ import { memo } from 'react'; -import PropTypes from 'prop-types'; import { WiDirectionDownLeft, @@ -55,8 +54,4 @@ function WindDirectionIcon({ degrees }) { return direction && direction.icon; } -WindDirectionIcon.propTypes = { - degrees: PropTypes.number.isRequired, -}; - export default memo(WindDirectionIcon); diff --git a/src/components/widgets/weather/weather.scss b/src/components/widgets/weather/weather.scss index e02c067d..3d3587d2 100644 --- a/src/components/widgets/weather/weather.scss +++ b/src/components/widgets/weather/weather.scss @@ -117,38 +117,3 @@ } } } - -.upcomingForecast { - display: flex; - width: 100%; - justify-content: space-between; - gap: 10px; - - div { - @include themed { - border-radius: t($borderRadius); - border: 1px solid t($btn-backgroundHover); - padding: 5px; - flex: 1; - - svg { - font-size: 36px; - } - - span { - justify-content: center; - } - - .period { - color: t($color); - font-size: 15px; - } - - .minmax { - margin-top: 5px; - flex-flow: column; - gap: 0 !important; - } - } - } -} diff --git a/vite.config.js b/vite.config.mjs similarity index 100% rename from vite.config.js rename to vite.config.mjs