refactor(marketing): Abstract form logic into reusable SectionStep component
Reduces code duplication in the marketing page forms by creating a generic `SectionStep` component. This new component encapsulates the shared UI and logic for sections that include a title, description, and a dynamic list of fields (e.g., feature cards, pricing points). The `FeaturesStep` component has been refactored to use this new `SectionStep`, resulting in a much cleaner and more maintainable implementation.
This commit is contained in:
@@ -4,6 +4,7 @@ import Stepper, { Step } from "@/components/ui/Stepper";
|
||||
import { BreadcrumbItem } from "@/types/shared";
|
||||
import { useState } from "react";
|
||||
import { ShowcaseSection } from "../../components/Layouts/showcase-section";
|
||||
import ChallengesStep from "./_components/ChallengesStep";
|
||||
import ChartStep from "./_components/ChartStep";
|
||||
import FeaturesStep from "./_components/FeaturesStep";
|
||||
import HeroStep from "./_components/HeroStep";
|
||||
@@ -37,9 +38,14 @@ const Marketing = () => {
|
||||
content: <FeaturesStep />,
|
||||
},
|
||||
{
|
||||
title: "Review",
|
||||
description: "Review and confirm",
|
||||
content: <div>step 4</div>,
|
||||
title: "Challenges",
|
||||
description: "Create challenges section",
|
||||
content: <ChallengesStep />,
|
||||
},
|
||||
{
|
||||
title: "Benefits",
|
||||
description: "create benefits section",
|
||||
content: <ChallengesStep />,
|
||||
},
|
||||
];
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user