From 93ff9217bd557c1dce5ccc2f268482b19a1b66cf Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Fri, 27 Sep 2024 20:59:36 +0100 Subject: [PATCH] refactor: convert more to new settings layout --- .../quicklinks/options/QuickLinksOptions.jsx | 29 +++++++++------ src/features/quote/options/Custom.jsx | 31 ++++++++-------- src/features/quote/options/QuoteOptions.jsx | 35 +++++++++++++------ src/features/stats/options/StatsOptions.jsx | 30 ++++++++-------- 4 files changed, 76 insertions(+), 49 deletions(-) diff --git a/src/features/quicklinks/options/QuickLinksOptions.jsx b/src/features/quicklinks/options/QuickLinksOptions.jsx index 78ec6361..6b40ef82 100644 --- a/src/features/quicklinks/options/QuickLinksOptions.jsx +++ b/src/features/quicklinks/options/QuickLinksOptions.jsx @@ -3,6 +3,7 @@ import { PureComponent, createRef } from 'react'; import { MdAddLink, MdLinkOff } from 'react-icons/md'; import { Header, Row, Content, Action, PreferencesWrapper } from 'components/Layout/Settings'; import { Checkbox, Dropdown } from 'components/Form/Settings'; +import { Hero, Preview, Controls } from 'components/Layout/Settings/Hero'; import { Button } from 'components/Elements'; import Modal from 'react-modal'; @@ -38,7 +39,7 @@ class QuickLinksOptions extends PureComponent { items: data, }); - variables.stats.postEvent('feature', 'quicklink' ,'delete'); + variables.stats.postEvent('feature', 'quicklink', 'delete'); } async addLink(name, url, icon) { @@ -199,24 +200,32 @@ class QuickLinksOptions extends PureComponent { return ( <> -
- + /> */} + + + + + + + + - + + {this.state.items.length === 0 && (
diff --git a/src/features/quote/options/Custom.jsx b/src/features/quote/options/Custom.jsx index 12a86fbc..7f1f897e 100644 --- a/src/features/quote/options/Custom.jsx +++ b/src/features/quote/options/Custom.jsx @@ -3,7 +3,7 @@ import { useState } from 'react'; import { MdCancel, MdAdd, MdOutlineFormatQuote } from 'react-icons/md'; import TextareaAutosize from '@mui/material/TextareaAutosize'; -import { Row, Content, Action } from 'components/Layout/Settings'; +import { Row, Content, Action, PreferencesWrapper } from 'components/Layout/Settings'; import { Button } from 'components/Elements'; function CustomSettings() { @@ -42,21 +42,22 @@ function CustomSettings() { return ( <> - - - -