feat: multi-step campaign creation form#92
Closed
josephchimebuka wants to merge 1 commit into
Closed
Conversation
Build the multi-step form container that manages step navigation. - Add src/pages/campaigns/CreateCampaignPage.jsx as the step container - Manage the current step via formStep in the campaigns Redux slice - Render the correct step component based on formStep (Details -> Funding -> Media -> Review) - Add Next and Back buttons plus a progress indicator for navigation - Persist form inputs in draftCampaign Redux state so data is retained when going back - Warn on unsaved changes via useBeforeUnload when leaving the page - Route /create (and /campaigns/create) to the new page, replacing the placeholder Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Multi-Step Form Structure for campaign creation.
Closes #86
What's included
src/pages/campaigns/CreateCampaignPage.jsxas the multi-step form container.formStepin thecampaignsRedux slice (nextStep/prevStep/setFormStep).formStep: Details → Funding → Media → Review.draftCampaignRedux state as the user moves between steps, so data is retained when going back.useBeforeUnload./create(and/campaigns/create) to the new page, replacing the previous static placeholder.Changes
src/features/campaigns/campaignsSlice.js— addformStep+draftCampaignstate with step/draft reducers and selectors (existingitems/loading/errorleft intact)src/pages/campaigns/CreateCampaignPage.jsx— step container with navigation +useBeforeUnloadsrc/pages/campaigns/steps/*— Details, Funding, Media, and Review step componentssrc/routes/AppRouter.jsx— point the create route to the new pagesrc/pages/CreateCampaign.jsx— removed (replaced by the multi-step page)Acceptance criteria
draftCampaignin Redux)useBeforeUnload)npm run buildpassesTest plan
/create, fill in step 1, click Next, then Back — data is retainedMade with Cursor