From 8718d59265f340774729694279d0dc05cf6a8dbb Mon Sep 17 00:00:00 2001 From: wpalani Date: Wed, 22 May 2024 15:36:00 -0700 Subject: [PATCH 1/7] Pass react router `useMatch` hook to the marketplace module --- src/app/pages/marketplace/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/pages/marketplace/index.js b/src/app/pages/marketplace/index.js index 02e8cf6f6..f52c918a8 100644 --- a/src/app/pages/marketplace/index.js +++ b/src/app/pages/marketplace/index.js @@ -1,11 +1,11 @@ import apiFetch from '@wordpress/api-fetch'; import { useState, useEffect } from '@wordpress/element'; -import { useLocation } from 'react-router-dom'; +import { useLocation, useMatch } from 'react-router-dom'; import classnames from 'classnames'; import { Container, Page } from '@newfold/ui-component-library'; import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime'; // component sourced from marketplace module -import { default as NewfoldMarketplace } from '@modules/wp-module-marketplace/components/marketplace/'; +import { default as NewfoldMarketplace } from '@modules/wp-module-marketplace/components/'; const MarketplacePage = () => { // constants to pass to module @@ -36,6 +36,7 @@ const MarketplacePage = () => { useState, useEffect, useLocation, + useMatch, NewfoldRuntime, }; From 7dea9cfab4f5eebd73430ec6e65d67e46fc9455a Mon Sep 17 00:00:00 2001 From: wpalani Date: Tue, 28 May 2024 12:48:06 -0700 Subject: [PATCH 2/7] Pass product page error state strings --- src/app/pages/marketplace/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app/pages/marketplace/index.js b/src/app/pages/marketplace/index.js index f52c918a8..0e46b9e70 100644 --- a/src/app/pages/marketplace/index.js +++ b/src/app/pages/marketplace/index.js @@ -26,6 +26,18 @@ const MarketplacePage = () => { 'bluehost-wordpress-plugin' ), loadMore: __( 'Load More', 'bluehost-wordpress-plugin' ), + productPage: { + error: { + title: __( + 'Oops! Something Went Wrong', + 'bluehost-wordpress-plugin' + ), + description: __( + 'An error occurred while loading the content. Please try again later.', + 'bluehost-wordpress-plugin' + ), + }, + }, }, }; From 766ee40d5db87d66663ab8f2b8518164f0e29196 Mon Sep 17 00:00:00 2001 From: wpalani Date: Thu, 30 May 2024 19:13:02 -0700 Subject: [PATCH 3/7] Pass `useNavigate` hook to the marketplace module components --- src/app/pages/marketplace/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/pages/marketplace/index.js b/src/app/pages/marketplace/index.js index 0e46b9e70..c0c6bac08 100644 --- a/src/app/pages/marketplace/index.js +++ b/src/app/pages/marketplace/index.js @@ -1,6 +1,6 @@ import apiFetch from '@wordpress/api-fetch'; import { useState, useEffect } from '@wordpress/element'; -import { useLocation, useMatch } from 'react-router-dom'; +import { useLocation, useMatch, useNavigate } from 'react-router-dom'; import classnames from 'classnames'; import { Container, Page } from '@newfold/ui-component-library'; import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime'; @@ -49,6 +49,7 @@ const MarketplacePage = () => { useEffect, useLocation, useMatch, + useNavigate, NewfoldRuntime, }; From 330272d740df7c4c89c4411a775cad4694b56cb8 Mon Sep 17 00:00:00 2001 From: wpalani Date: Wed, 5 Jun 2024 11:36:38 -0700 Subject: [PATCH 4/7] Marketplace page overflow hidden --- src/app/pages/marketplace/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/pages/marketplace/index.js b/src/app/pages/marketplace/index.js index c0c6bac08..e8fa068af 100644 --- a/src/app/pages/marketplace/index.js +++ b/src/app/pages/marketplace/index.js @@ -55,7 +55,11 @@ const MarketplacePage = () => { return ( - + Date: Thu, 6 Jun 2024 20:14:40 -0700 Subject: [PATCH 5/7] add `nfd-overflow-clip` to marketplace page wrapper to allow sticky scrolling --- src/app/pages/marketplace/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/marketplace/index.js b/src/app/pages/marketplace/index.js index e8fa068af..a920acd52 100644 --- a/src/app/pages/marketplace/index.js +++ b/src/app/pages/marketplace/index.js @@ -57,7 +57,7 @@ const MarketplacePage = () => { Date: Tue, 18 Jun 2024 13:42:20 -0700 Subject: [PATCH 6/7] Bump marketplace module to `2.3.0` --- composer.json | 2 +- composer.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 66c1ea541..50c8c2138 100644 --- a/composer.json +++ b/composer.json @@ -85,7 +85,7 @@ "newfold-labs/wp-module-global-ctb": "^1.0.12", "newfold-labs/wp-module-help-center": "^2.0.0", "newfold-labs/wp-module-loader": "^1.0.10", - "newfold-labs/wp-module-marketplace": "^2.2.4", + "newfold-labs/wp-module-marketplace": "^2.3.0", "newfold-labs/wp-module-notifications": "^1.3.0", "newfold-labs/wp-module-onboarding": "^2.3.4", "newfold-labs/wp-module-patterns": "2.0.0 as 1.9.9", diff --git a/composer.lock b/composer.lock index 12117d276..e1adda639 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "99b7c1ad2aec59177f25bdd742adaa23", + "content-hash": "15a4c73e6adf3c8edea847e9f0e2c2b3", "packages": [ { "name": "doctrine/inflector", @@ -1009,20 +1009,20 @@ }, { "name": "newfold-labs/wp-module-marketplace", - "version": "2.2.4", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-marketplace.git", - "reference": "3b1864b75d069ca896e205792209a797a24f2abb" + "reference": "2d5064b3a935246f4e05f826b97663bdaa251d3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-marketplace/zipball/3b1864b75d069ca896e205792209a797a24f2abb", - "reference": "3b1864b75d069ca896e205792209a797a24f2abb", + "url": "https://api.github.com/repos/newfold-labs/wp-module-marketplace/zipball/2d5064b3a935246f4e05f826b97663bdaa251d3e", + "reference": "2d5064b3a935246f4e05f826b97663bdaa251d3e", "shasum": "" }, "require": { - "newfold-labs/wp-module-data": "^2.0.0" + "newfold-labs/wp-module-data": "^2.5.2" }, "require-dev": { "newfold-labs/wp-php-standards": "^1.2" @@ -1059,10 +1059,10 @@ ], "description": "A module for rendering product data and interacting with the Hiive marketplace API.", "support": { - "source": "https://github.com/newfold-labs/wp-module-marketplace/tree/2.2.4", + "source": "https://github.com/newfold-labs/wp-module-marketplace/tree/2.3.0", "issues": "https://github.com/newfold-labs/wp-module-marketplace/issues" }, - "time": "2024-02-27T17:01:06+00:00" + "time": "2024-06-18T05:06:33+00:00" }, { "name": "newfold-labs/wp-module-migration", From d73be54526ca83b3958cf0820838e38061e0e15d Mon Sep 17 00:00:00 2001 From: wpalani Date: Tue, 18 Jun 2024 14:26:35 -0700 Subject: [PATCH 7/7] Fix eslint issue `socialMediaAccounts.js` Even though this issue is not related to this PR. fixing it here anyway. --- src/app/pages/settings/socialMediaAccounts.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/pages/settings/socialMediaAccounts.js b/src/app/pages/settings/socialMediaAccounts.js index 36369c30c..b4c6f203a 100644 --- a/src/app/pages/settings/socialMediaAccounts.js +++ b/src/app/pages/settings/socialMediaAccounts.js @@ -15,8 +15,11 @@ const SocialMediaAccounts = () => { const getFbDetails = () => { getFacebookUserProfileDetails().then( ( res ) => { setFbLogin( res === 'token not found!' ? false : true ); - if ( Array.isArray( res ) ) setLoginInfo( res[ 0 ] ); - else setLoginInfo( res ); + if ( Array.isArray( res ) ) { + setLoginInfo( res[ 0 ] ); + } else { + setLoginInfo( res ); + } } ); };