Skip to content

Commit

Permalink
update to use buildless component
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Oct 2, 2024
1 parent 8dfcac7 commit 01c36fe
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 23 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"newfold-labs/wp-module-performance": "2.0.1 as 1.9.9",
"newfold-labs/wp-module-runtime": "^1.0.11",
"newfold-labs/wp-module-secure-passwords": "^1.1.1",
"newfold-labs/wp-module-solutions": "dev-update/buildless-component",
"newfold-labs/wp-module-sso": "^1.0.6",
"newfold-labs/wp-module-staging": "^2.1.0",
"wp-forge/wp-update-handler": "^1.0.2",
Expand Down
50 changes: 49 additions & 1 deletion composer.lock

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

2 changes: 1 addition & 1 deletion src/app/data/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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 Solutions from '../pages/solutions';
import Performance from '../pages/performance';
import Settings from '../pages/settings';
import Staging from '../pages/staging';
Expand Down
58 changes: 58 additions & 0 deletions src/app/pages/solutions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import './style.scss';
import apiFetch from '@wordpress/api-fetch';
import { useState, useEffect } from '@wordpress/element';
import { useLocation, useMatch, useNavigate } from 'react-router-dom';
import { Container, Page, Title } from '@newfold/ui-component-library';
import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime';
import { default as NewfoldEntitlements } from '@modules/wp-module-solutions/components/entitlements';

const Solutions = () => {

// constants to pass to module
const moduleConstants = {
text: {
title: __( 'Solution', 'bluehost-wordpress-plugin' ),
subTitle: __(
'Explore the entitlements available with your solution.',
'bluehost-wordpress-plugin'
),
error: __(
'Oops, there was an error loading the entitlements, please try again later.',
'bluehost-wordpress-plugin'
),
noEntitlements: __(
'Sorry, no current entitlements. Please, try again later.',
'bluehost-wordpress-plugin'
),
},
};

// methods to pass to module
const moduleMethods = {
apiFetch,
classNames,
useState,
useEffect,
useLocation,
useMatch,
useNavigate,
NewfoldRuntime,
};

return (
<Page>
<Container
className={
'newfold-entitlements-container nfd-overflow-clip'
}
>
<NewfoldEntitlements
methods={ moduleMethods }
constants={ moduleConstants }
/>
</Container>
</Page>
);
};

export default Solutions;
File renamed without changes.
21 changes: 0 additions & 21 deletions src/app/pages/wpsolutions/index.js

This file was deleted.

0 comments on commit 01c36fe

Please sign in to comment.