Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marketplace single product pages #1127

Merged
merged 9 commits into from
Jun 19, 2024
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 21 additions & 3 deletions src/app/pages/marketplace/index.js
Original file line number Diff line number Diff line change
@@ -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, 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';
// 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
Expand All @@ -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'
),
},
},
},
};

Expand All @@ -36,12 +48,18 @@ const MarketplacePage = () => {
useState,
useEffect,
useLocation,
useMatch,
useNavigate,
NewfoldRuntime,
};

return (
<Page className={ 'wppbh-app-marketplace-page' }>
<Container className={ 'wppbh-app-marketplace-container' }>
<Container
className={
'wppbh-app-marketplace-container nfd-overflow-clip'
}
>
<NewfoldMarketplace
methods={ moduleMethods }
constants={ moduleConstants }
Expand Down
7 changes: 5 additions & 2 deletions src/app/pages/settings/socialMediaAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
} );
};

Expand Down
Loading