Extract report builder routes to Next.js#862
Open
SakshiKekre wants to merge 1 commit intonextjs-calculator-migrationfrom
Open
Extract report builder routes to Next.js#862SakshiKekre wants to merge 1 commit intonextjs-calculator-migrationfrom
SakshiKekre wants to merge 1 commit intonextjs-calculator-migrationfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Migrate ReportBuilderPage and ModifyReportPage from the React Router catch-all to dedicated Next.js file-based routes: - [countryId]/reports/create/page.tsx → ReportBuilderPage - [countryId]/reports/create/[userReportId]/page.tsx → ModifyReportPage Swap react-router-dom imports to router abstraction in page components and ReportBuilderShell. ModifyReportPage now accepts userReportId as a prop (bridged via wrapper in CalculatorRouter for Vite, via Next.js params for calculator-app). Convert location.state usage to query params for cross-router compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
480d58e to
ccc775a
Compare
7 tasks
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
[countryId]/reports/create/and[countryId]/reports/create/[userReportId]/)react-router-domimports (useNavigate,useLocation,useParams) to the router abstraction layer (useAppNavigate,useAppLocation, prop passing)location.stateusage in ModifyReportPage to query params (?from=report-output&reportPath=...) for cross-router compatibilitylocation.stateto use query params insteadModifyReportPageRoutebridge wrapper in CalculatorRouter so the Vite app continues to work viauseParamsDependent PR
#869 (report output extraction) is based on this branch. It will be merged into this branch before everything merges up to #851 → main. See #851 for the full merge strategy.
Route mapping
/:countryId/reports/createcalculator-app/src/app/[countryId]/reports/create/page.tsx/:countryId/reports/create/:userReportIdcalculator-app/src/app/[countryId]/reports/create/[userReportId]/page.tsxTest plan
cd calculator-app && bun run dev— navigate to/us/reports/create, create a report/us/reports/create/<id>— verify modify page loads with report data?from=report-output&reportPath=...) pass through and back navigation workscd app && VITE_APP_MODE=calculator npx vite— Vite dev server still works for both routesbun run test— all 2950 tests passbun run lint— no errorsbun run typecheck— passes (app + calculator-app)