Skip to content

Commit 092be6e

Browse files
author
Vivek Vishal
authored
Merge pull request #6559 from layer5io/fix-pricing-plan
fix: pricing buttons
2 parents b8b3347 + cad4fca commit 092be6e

File tree

2 files changed

+14
-204
lines changed

2 files changed

+14
-204
lines changed

src/components/PlanCard/index.js

Lines changed: 11 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@ import Button from "../../reusecore/Button";
33
import { Col, Row, Container } from "../../reusecore/Layout";
44
import PlanCardWrapper from "./planCard.style";
55
import FeatureDetails from "./collapsible-details";
6-
import Modal from "react-modal";
7-
import CommonForm from "../CommonForm";
86

9-
const PlanCard = ({ planData , isYearly }) => {
107

11-
const [modalIsOpen, setModalIsOpen] = useState(false);
8+
const PlanCard = ({ planData , isYearly }) => {
129

13-
const openModal = () => setModalIsOpen(true);
14-
const closeModal = () => setModalIsOpen(false);
1510

1611
if (!planData || !Array.isArray(planData) || planData.length === 0) {
1712
return <div>No plan data available</div>;
1813
}
14+
const planLink = {
15+
"Personal": "https://cloud.layer5.io/account/plans",
16+
"Team Designer": "https://cloud.layer5.io/account/plans/upgrade?plan=49b77ce8-eeea-4ec4-adf3-48979a14b140",
17+
"Team Operator": "https://cloud.layer5.io/account/plans/upgrade?plan=f7a5b2b5-b36b-421e-9211-f4dfb204e5b3",
18+
"Enterprise": "https://cloud.layer5.io/account/plans/upgrade?plan=ad68ce59-8c5a-42b0-955c-9b2b2f7c98e3"
19+
};
1920

2021
return (
2122
<PlanCardWrapper>
@@ -30,11 +31,11 @@ const PlanCard = ({ planData , isYearly }) => {
3031

3132
{x.tier === "Team Designer" ? <div className="featured-label">Most Popular</div> : null}
3233

33-
{x.pricing_coming_soon && (
34+
{/* {x.pricing_coming_soon && (
3435
<div className="pricing_coming_soon">
3536
{x.pricing_coming_soon}
3637
</div>
37-
)}
38+
)} */}
3839

3940
<h2>{x.tier}</h2>
4041
<h5 className="byline">{x.byline}</h5>
@@ -84,9 +85,9 @@ const PlanCard = ({ planData , isYearly }) => {
8485
? "price-button-disabled"
8586
: "price-button-link"
8687
}
87-
onClick={x.tier === "Enterprise" ? openModal : undefined}
88+
$url={planLink[x.tier] ?? "https://cloud.layer5.io/account/plans"}
8889
>
89-
{x.tier === "Enterprise" ? "Contact Sales" : x.button[0]}
90+
{x.tier === "Personal" ? "Join for Free" : "Subscribe"}
9091
</Button>
9192

9293
<h6>{x.byline2}</h6>
@@ -109,58 +110,6 @@ const PlanCard = ({ planData , isYearly }) => {
109110
))}
110111
</Row>
111112
</Container>
112-
<Modal
113-
isOpen={modalIsOpen}
114-
onRequestClose={closeModal}
115-
className="Modal"
116-
overlayClassName="Overlay"
117-
ariaHideApp={false}
118-
contentLabel="Enterprise Inquiry Form"
119-
style={{
120-
content: {
121-
maxHeight: "90vh",
122-
overflow: "hidden",
123-
display: "flex",
124-
flexDirection: "column",
125-
"&::-webkit-scrollbar": {
126-
display: "none"
127-
},
128-
scrollbarWidth: "none",
129-
msOverflowStyle: "none"
130-
},
131-
overlay: {
132-
overflow: "auto",
133-
"&::-webkit-scrollbar": {
134-
display: "none"
135-
},
136-
scrollbarWidth: "none",
137-
msOverflowStyle: "none"
138-
}
139-
}}
140-
>
141-
<Button $secondary className="close-modal-btn" onClick={closeModal}>
142-
X
143-
</Button>
144-
<h2 className="modal-heading">Contact sales</h2>
145-
<div style={{
146-
flex: 1,
147-
overflow: "auto",
148-
scrollbarWidth: "none",
149-
msOverflowStyle: "none",
150-
"&::-webkit-scrollbar": {
151-
display: "none"
152-
}
153-
}}>
154-
<CommonForm
155-
title="Contact sales"
156-
form="contact"
157-
account_desc=""
158-
submit_title="Thanks for contacting us!"
159-
submit_body="We'll get back to you as soon as we can."
160-
submit_button_title="Contact sales"
161-
/>
162-
</div>
163-
</Modal>
164113
</PlanCardWrapper>
165114
);
166115
};

src/sections/Products/index.js

Lines changed: 3 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -11,152 +11,13 @@ import mesheryLogo from "../../assets/images/meshery/icon-only/meshery-logo-ligh
1111
import cloudicon from "./images/cloud.svg";
1212
import layer5 from "../../assets/images/layer5/5 icon/svg/light/5-light-no-trim.svg";
1313
import kanvas from "../../assets/images/kanvas/icon-only/kanvas-icon-color.svg";
14-
import comingSoon from "./icons/coming-soon.webp";
1514
import { useStyledDarkMode } from "../../theme/app/useStyledDarkMode";
1615
import PlanCard from "../../components/PlanCard";
1716
import { Row } from "../../reusecore/Layout";
1817
import Reviews from "../Pricing/review-slider";
18+
import options from "../Pricing/generatePlans";
19+
1920

20-
const options = [
21-
{
22-
tier: "Personal",
23-
featured: true,
24-
monthlyprice: 0,
25-
yearlyprice: 0,
26-
byline: "Open Source features, plus:",
27-
button: ["Join for Free", "https://cloud.layer5.io"],
28-
summary: [
29-
{
30-
id: 0,
31-
category: "Cloud Native Design Patterns",
32-
description:
33-
"Import and export your designs using your local filesystem or remote URL.",
34-
},
35-
{
36-
id: 1,
37-
category: "Multiple Kubernetes Clusters",
38-
description:
39-
"Ongoing synchronization of Kubernetes configuration, workloads and cloud native infrastructure changes across any number of Kubernetes clusters.",
40-
},
41-
{
42-
id: 2,
43-
category: "Cluster Discovery",
44-
description:
45-
"Day 2 support for ongoing synchronization of Kubernetes configuration, workloads and cloud native infrastructure changes.",
46-
},
47-
{
48-
id: 3,
49-
category: "Microservices Performance",
50-
description:
51-
"Continuous visibility across all of your clusters and workloads.",
52-
},
53-
{
54-
id: 4,
55-
category: "Load Generation",
56-
description:
57-
"Single Load Generator: Support testing multiple endpoints simultaneously.",
58-
},
59-
{
60-
id: 5,
61-
category: "MeshMark",
62-
description: "Identify the cost of a specific network function.",
63-
},
64-
],
65-
},
66-
{
67-
tier: "Team",
68-
featured: false,
69-
monthlyprice: 9.99,
70-
yearlyprice: 100,
71-
byline: "Everything in Free, plus:",
72-
button: [
73-
"Contact Sales",
74-
"https://us15.list-manage.com/contact-form?u=6b50be5aea3dfe1fd4c041d80&form_id=d0ffe17c92d8014ede6b721aa16096e8",
75-
],
76-
summary: [
77-
{
78-
id: 0,
79-
category: "Dry-run",
80-
description:
81-
"Test and verify configuration changes in a separate environment.",
82-
},
83-
{
84-
id: 1,
85-
category: "Design Reviews",
86-
description:
87-
"Discuss any design by leaving review comments or notes on a specific design. Control who has access, notify discussion participants with updates, and link from anywhere.",
88-
},
89-
{
90-
id: 2,
91-
category: "Visual Design",
92-
description:
93-
"Drag-n-drop cloud native infrastructure designer to configure, model, and deploy your workloads",
94-
},
95-
{
96-
id: 3,
97-
category: "Performance Profiles",
98-
description:
99-
"Share performance profiles and test results with individual users or teams.",
100-
},
101-
{
102-
id: 4,
103-
category: "Built-in Roles",
104-
description: "Static - out of the box",
105-
},
106-
{
107-
id: 5,
108-
category: "Standard Support",
109-
description:
110-
"Layer5 Support can help you troubleshoot issues you run into while using Meshery. Get support via the web.",
111-
},
112-
],
113-
},
114-
{
115-
tier: "Enterprise",
116-
featured: false,
117-
monthlyprice: 15.99,
118-
yearlyprice: 180,
119-
pricing_coming_soon: <img src={comingSoon}></img>,
120-
byline: "Everything in Team, plus:",
121-
button: ["Coming Soon", ""],
122-
summary: [
123-
{
124-
id: 0,
125-
category: "User-defined Roles",
126-
description: "Customizable roles for specific permission assignments",
127-
},
128-
{
129-
id: 1,
130-
category: "Authentication: LDAP",
131-
description:
132-
"Access Meshery using your existing accounts and centrally manage repository access.",
133-
},
134-
{
135-
id: 2,
136-
category: "Authentication: SAML",
137-
description:
138-
"Use an identity provider to manage the identities of Meshery users and applications.",
139-
},
140-
{
141-
id: 3,
142-
category: "Self-hosted Deployment",
143-
description:
144-
"Self-hosted Meshery Cloud for on-prem appliances or self-managed cloud tenants.",
145-
},
146-
{
147-
id: 4,
148-
category: "Traffic Replay",
149-
description: "Visual event replay in Kanvas",
150-
},
151-
{
152-
id: 5,
153-
category: "Phone Support",
154-
description:
155-
"Layer5 Support can help you troubleshoot issues you run into while using Meshery. Get support via phone.",
156-
},
157-
],
158-
},
159-
];
16021
const CardsData = [
16122
{
16223
id: 1,
@@ -305,4 +166,4 @@ const index = () => {
305166
);
306167
};
307168

308-
export default index;
169+
export default index;

0 commit comments

Comments
 (0)