Skip to content

Commit 0ee5269

Browse files
committed
Pricing: Make sub-addon feature chips dynamic
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
1 parent c59242c commit 0ee5269

1 file changed

Lines changed: 5 additions & 29 deletions

File tree

  • src/components/Pricing/PricingAddons

src/components/Pricing/PricingAddons/index.js

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ export const PricingAddons = ({ isYearly = false, setIsYearly }) => {
285285
description="A comprehensive learning management system for creators and instructors on how to build, manage, and extend educational content like learning paths, challenges, and certifications."
286286
>
287287
<Box sx={{ display: "flex", flexDirection: "row", flexWrap: "wrap", gap: 1, my: 1, mt: 1 }}>
288-
{selectedAddon?.features?.map((feature, index) => (
288+
{selectedAddon?.subAddOns?.find(sub => sub.id === "academy-theory")?.features?.map((feature, index) => (
289289
<Chip
290-
key={`main-${index}`}
290+
key={`theory-${index}`}
291291
icon={<CheckCircle sx={{ fontSize: 12 }} />}
292292
label={feature}
293293
size="small"
@@ -298,18 +298,6 @@ export const PricingAddons = ({ isYearly = false, setIsYearly }) => {
298298
"& .MuiChip-icon": { color: "primary.main" },
299299
}} />
300300
))}
301-
<Chip icon={<CheckCircle sx={{ height: "1rem" }} />}
302-
label="Learning Paths" size="large" className="addon-chip"
303-
/>
304-
<Chip icon={<CheckCircle sx={{ height: "1rem" }} />}
305-
label="Challenges" size="large" className="addon-chip"
306-
/>
307-
<Chip icon={<CheckCircle sx={{ height: "1rem" }} />}
308-
label="Certifications" size="large" className="addon-chip"
309-
/>
310-
<Chip icon={<CheckCircle sx={{ height: "1rem" }} />}
311-
label="Instructor Console" size="large" className="addon-chip"
312-
/>
313301
</Box>
314302
</FeatureDetails>
315303
</Box>
@@ -322,14 +310,14 @@ export const PricingAddons = ({ isYearly = false, setIsYearly }) => {
322310
color="primary" />}
323311
sx={{ display: "block", alignContent: "flex-start" }}
324312
/>
325-
<FeatureDetails sx={{ marginTop: ".5rem", alignSelf: "flex-start" }}
313+
<FeatureDetails
326314
category="Practical Learning"
327315
description="An inclusive, collaborative, hands-on learning environment powered by Kanvas with labs for students."
328316
>
329317
<Box sx={{ display: "flex", flexWrap: "wrap", gap: 1, my: 1, mt: 1 }}>
330-
{selectedAddon?.features?.map((feature, index) => (
318+
{selectedAddon?.subAddOns?.find(sub => sub.id === "academy-practical")?.features?.map((feature, index) => (
331319
<Chip
332-
key={`main-${index}`}
320+
key={`practical-${index}`}
333321
icon={<CheckCircle sx={{ fontSize: 12 }} />}
334322
label={feature}
335323
size="small"
@@ -339,18 +327,6 @@ export const PricingAddons = ({ isYearly = false, setIsYearly }) => {
339327
"& .MuiChip-icon": { color: "primary.main" },
340328
}} />
341329
))}
342-
<Chip icon={<CheckCircle sx={{ height: "1rem" }} />}
343-
label="Hands-on Learning" size="large" className="addon-chip"
344-
/>
345-
<Chip icon={<CheckCircle sx={{ height: "1rem" }} />}
346-
label="Collaborative Instruction" size="large" className="addon-chip"
347-
/>
348-
<Chip icon={<CheckCircle sx={{ height: "1rem" }} />}
349-
label="Visual Design" size="large" className="addon-chip"
350-
/>
351-
<Chip icon={<CheckCircle sx={{ height: "1rem" }} />}
352-
label="Orchestrated Infrastructure" size="large" className="addon-chip"
353-
/>
354330
</Box>
355331
</FeatureDetails>
356332
</Box>

0 commit comments

Comments
 (0)