Skip to content

Update to Next js APP router.#11

Open
rvadherhztl03 wants to merge 1 commit into
ordercloud-api:mainfrom
rvadherhztl03:feature/next-js-app-router
Open

Update to Next js APP router.#11
rvadherhztl03 wants to merge 1 commit into
ordercloud-api:mainfrom
rvadherhztl03:feature/next-js-app-router

Conversation

@rvadherhztl03

Copy link
Copy Markdown

Summary

This PR migrates the storefront from the Next.js Pages Router to the App Router and updates the project to support newer Next.js, React, and related dependencies.

Changes Made

  • Migrated page routes from pages/ to the new app/ directory structure.
  • Added App Router layouts, including global metadata, favicon configuration, OrderCloud provider setup, and shared layout wrapping.
  • Updated product listing, product detail, cart, checkout, login, confirmation, and home pages for App Router compatibility.
  • Migrated checkout API routes into App Router route handlers under app/api.
  • Added webhook helper support for adapting OrderCloud webhook-style handlers to App Router Request / Response APIs.
  • Updated routing logic to use next/navigation instead of next/router.
  • Marked client-side components with "use client" where hooks, Redux, router APIs, or browser behavior are required.
  • Updated Next.js, React, React DOM, React Redux, TypeScript, Node, and React type dependencies.
  • Adjusted TypeScript and ESLint configuration for the newer Next.js setup.
  • Cleaned up several TypeScript issues and improved typings around layout children, checkout submission, payments, and product detail handling.

Testing

  • Verified migration structure and route changes against the current branch diff.
  • Please run the app locally and test product listing, product detail, cart, checkout, login, and order confirmation flows before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant