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

PRESS0-2276 - fixes #362

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '1e2489c811e01f5a9951');
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'c47e1e6f7107db151554');
10 changes: 5 additions & 5 deletions src/components/WPSolutionsBanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { NewfoldRuntime } from "../sdk/NewfoldRuntime";
import { PluginsSdk } from "../sdk/plugins";
import { NoExistingPlan } from "./NoExistingPlan";
import { Section } from "./Section";
import classNames from 'classnames';


export function WPSolutionsBanner() {
Expand All @@ -23,7 +24,6 @@ export function WPSolutionsBanner() {
const [ pluginActiveStatusArray, setPluginActiveStatusArray] = useState([]);
let currentSolution = [];

//TODO: To add slug information for all premium plugins once data is available
let premiumPluginStatus = useSWR(
"nfd_slug_wonder_cart",
() =>
Expand Down Expand Up @@ -86,13 +86,13 @@ export function WPSolutionsBanner() {
<Section.Header
title={__("Explore Your Plugins and Tools", "wp-module-ecommerce")}
subTitle={__("Improve your site with the tools and services included in your plan.", "wp-module-ecommerce")}
secondaryAction={{title : __( `View ${solutionButtonTextObject[purchasedSolution]} tools`, "wp-module-ecommerce" ), className: false, onClick: routeChange }}
secondaryAction={{title : __( `View all your plugins and tools`, "wp-module-ecommerce" ), className: false, onClick: routeChange }}
/>
<Section.Content className="nfd-app-section-home">
<div className="nfd-flex nfd-flex-row nfd-flex-wrap">
<div className={classNames('nfd-grid nfd-grid-flow-row-dense nfd-grid-cols-3 nfd-grid-rows-2 nfd-gap-6')}>
{
solutionsCards?.map((details, index) => {
return (<div key="index" className={"nfd-flex nfd-flex-col nfd-bg-[#F1F5F7] nfd-p-6 nfd-rounded-lg nfd-border nfd-border-[#E2E8F0] nfd-box-content "+ (index === 0 ? "nfd-w-[38.33%] nfd-mr-6 nfd-mb-6" : index === 1 ? "nfd-w-6/12 nfd-mb-6" : index === 2 ? "nfd-w-6/12 nfd-mr-6" : "nfd-w-[38.33%]") }>
return (<div key={index} className={classNames("max-[950px]:nfd-col-span-3", "nfd-flex nfd-flex-col nfd-bg-[#F1F5F7] nfd-p-6 nfd-rounded-lg nfd-border nfd-border-[#E2E8F0] nfd-box-content", `${ index === 0 || index === 3 ? 'nfd-col-span-1': 'nfd-col-span-2'}`)}>
<h2 className="nfd-text-[#0F172A] nfd-text-lg nfd-leading-5 nfd-font-semibold nfd-mb-4">
{ __(`${details['title']}`,"wp-module-ecommerce") }
</h2>
Expand Down Expand Up @@ -139,7 +139,7 @@ export function WPSolutionsBanner() {
</div>

<Button as="a" href={myPluginsAndToolsPageLink} className="nfd-button nfd-button--secondary nfd-flex nfd-w-56 nfd-mx-auto nfd-mt-3">
{__(`View all ${solutionButtonTextObject[purchasedSolution]} tools`, "wp-module-ecommerce")}
{__(`View all your plugins and tools`, "wp-module-ecommerce")}
</Button>
</Section.Content>
</Section.Container>
Expand Down