From 30db459fff86975390e5e181a8fda2206d3d23b0 Mon Sep 17 00:00:00 2001 From: thePeras Date: Sat, 2 Nov 2024 16:56:21 +0000 Subject: [PATCH 1/3] Refactor popup and created two different categories --- popup/components/layout/Main.js | 9 - popup/components/layout/Section.js | 19 + popup/components/sections/Features.js | 10 + popup/components/sections/Layout.js | 19 +- popup/components/sections/LayoutContent.js | 25 - popup/pages/index.js | 9 +- popup/styles/globals.css | 20 - popup/yarn.lock | 7043 ++++++++------------ 8 files changed, 2796 insertions(+), 4358 deletions(-) delete mode 100644 popup/components/layout/Main.js create mode 100644 popup/components/layout/Section.js create mode 100644 popup/components/sections/Features.js delete mode 100644 popup/components/sections/LayoutContent.js diff --git a/popup/components/layout/Main.js b/popup/components/layout/Main.js deleted file mode 100644 index 63527e6..0000000 --- a/popup/components/layout/Main.js +++ /dev/null @@ -1,9 +0,0 @@ -import Layout from "../sections/Layout"; - -const Main = () => ( -
- -
-); - -export default Main; diff --git a/popup/components/layout/Section.js b/popup/components/layout/Section.js new file mode 100644 index 0000000..78d4883 --- /dev/null +++ b/popup/components/layout/Section.js @@ -0,0 +1,19 @@ +const Section = ({ title, children }) => ( +
+ +
+
+
+
{children}
+
+
+
+
+); + +export default Section; diff --git a/popup/components/sections/Features.js b/popup/components/sections/Features.js new file mode 100644 index 0000000..1524812 --- /dev/null +++ b/popup/components/sections/Features.js @@ -0,0 +1,10 @@ +import Section from "../layout/Section"; +import SwitchControl from "../controls/SwitchControl"; + +const Layout = () => ( +
+ +
+); + +export default Layout; diff --git a/popup/components/sections/Layout.js b/popup/components/sections/Layout.js index 96a4fae..94eb944 100644 --- a/popup/components/sections/Layout.js +++ b/popup/components/sections/Layout.js @@ -1,17 +1,12 @@ -import LayoutContent from "./LayoutContent"; +import Section from "../layout/Section"; +import SwitchControl from "../controls/SwitchControl"; const Layout = () => ( -
- -
- -
-
+
+ + + +
); export default Layout; diff --git a/popup/components/sections/LayoutContent.js b/popup/components/sections/LayoutContent.js deleted file mode 100644 index 773aae4..0000000 --- a/popup/components/sections/LayoutContent.js +++ /dev/null @@ -1,25 +0,0 @@ -import SwitchControl from "../controls/SwitchControl"; - -const LayoutContent = () => ( -
-
-
- - - - -
-
-
-); - -export default LayoutContent; diff --git a/popup/pages/index.js b/popup/pages/index.js index 1dce5d2..5baeafa 100644 --- a/popup/pages/index.js +++ b/popup/pages/index.js @@ -1,12 +1,17 @@ import Container from "../components/layout/Container"; import Footer from "../components/layout/Footer"; import Header from "../components/layout/Header"; -import Main from "../components/layout/Main"; + +import Layout from "../components/sections/Layout"; +import Features from "../components/sections/Features"; const IndexPage = () => (
-
+
+ + +