From 6b1622d55dc4db65061460e7009a31538195cccc Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Thu, 19 Sep 2024 20:17:05 +0530 Subject: [PATCH 1/3] Create page linked WP module Solutions in BH --- src/app/data/routes.js | 9 +++++++++ src/app/pages/wpsolutions/index.js | 21 +++++++++++++++++++++ src/app/pages/wpsolutions/style.scss | 12 ++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 src/app/pages/wpsolutions/index.js create mode 100644 src/app/pages/wpsolutions/style.scss diff --git a/src/app/data/routes.js b/src/app/data/routes.js index 2c96452dc..e10d0a6c2 100644 --- a/src/app/data/routes.js +++ b/src/app/data/routes.js @@ -15,6 +15,7 @@ import Home from '../pages/home'; import PagesAndPosts from '../pages/pages-and-posts'; import Store from '../pages/ecommerce/page'; import Marketplace from '../pages/marketplace'; +import WPSolution from '../pages/wpsolutions'; import Performance from '../pages/performance'; import Settings from '../pages/settings'; import Staging from '../pages/staging'; @@ -69,6 +70,7 @@ const topRoutePaths = [ '/pages-and-posts', '/store', '/marketplace', + '/my_plugins_and_tools', '/performance', '/settings', '/staging', @@ -135,6 +137,13 @@ export const routes = [ subRoutes: await getMarketplaceSubnavRoutes(), condition: true, }, + { + name: '/my_plugins_and_tools', + title: __( 'My Plugins & Tools', 'wp-plugin-bluehost' ), + Component: WPSolution, + Icon: ShoppingBagIcon, + condition: true, + }, { name: '/performance', title: __( 'Performance', 'wp-plugin-bluehost' ), diff --git a/src/app/pages/wpsolutions/index.js b/src/app/pages/wpsolutions/index.js new file mode 100644 index 000000000..28158a00a --- /dev/null +++ b/src/app/pages/wpsolutions/index.js @@ -0,0 +1,21 @@ +import './styles.scss'; +import { Page } from '@newfold/ui-component-library'; +import { NewfoldSolutions } from '@newfold-labs/wp-module-solutions'; +import '@newfold-labs/wp-module-ecommerce/bluehost.css'; +import { useNavigate } from 'react-router-dom'; +import { useNotification } from '../../components/notifications'; + +const WPSolutions = () => { + + const navigate = useNavigate(); + const notify = useNotification(); + const wpModules = { navigate, notify }; + + return ( + + + + ); +}; + +export default WPSolutions; diff --git a/src/app/pages/wpsolutions/style.scss b/src/app/pages/wpsolutions/style.scss new file mode 100644 index 000000000..f0988190a --- /dev/null +++ b/src/app/pages/wpsolutions/style.scss @@ -0,0 +1,12 @@ +.nfd-root { + .nfd-modal.no-overlay { + .nfd-modal__overlay { + display: none; + } + } + .nfd-feature-upsell.hide-html { + .nfd-flex { + background-color: rgb(255 255 255 / 0.5); + } + } +} \ No newline at end of file From 45398e1bf30b37c89614534fd9194b472954d0f5 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Thu, 19 Sep 2024 20:23:02 +0530 Subject: [PATCH 2/3] Add menu icon for My plugins & tools --- src/app/data/routes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/data/routes.js b/src/app/data/routes.js index e10d0a6c2..68231eccc 100644 --- a/src/app/data/routes.js +++ b/src/app/data/routes.js @@ -6,6 +6,7 @@ import { AdjustmentsHorizontalIcon, BuildingStorefrontIcon, DocumentDuplicateIcon, + PuzzlePieceIcon } from '@heroicons/react/24/outline'; import { ReactComponent as HelpIcon } from '../components/icons/HelpIcon.svg'; import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime'; @@ -141,7 +142,7 @@ export const routes = [ name: '/my_plugins_and_tools', title: __( 'My Plugins & Tools', 'wp-plugin-bluehost' ), Component: WPSolution, - Icon: ShoppingBagIcon, + Icon: PuzzlePieceIcon, condition: true, }, { From 8dfcac7039ba40c2c58658a2322dd4f6cdaa9189 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Mon, 23 Sep 2024 21:05:51 +0530 Subject: [PATCH 3/3] ESLint fix --- src/app/data/routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/data/routes.js b/src/app/data/routes.js index 68231eccc..148b7aea3 100644 --- a/src/app/data/routes.js +++ b/src/app/data/routes.js @@ -6,7 +6,7 @@ import { AdjustmentsHorizontalIcon, BuildingStorefrontIcon, DocumentDuplicateIcon, - PuzzlePieceIcon + PuzzlePieceIcon, } from '@heroicons/react/24/outline'; import { ReactComponent as HelpIcon } from '../components/icons/HelpIcon.svg'; import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime';