mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What? Intercepting routes should only override the slot they are in and not affect other parts of the tree. This PR makes sure we replace all other slots with the default route. Closes PACK-3219 Fixes #69299 Closes #69575
13 lines
506 B
TypeScript
13 lines
506 B
TypeScript
// This component is required for the cart modal to hide when the user navigates to a new page
|
|
// https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#closing-the-modal
|
|
// Since client-side navigations to a route that no longer match the slot will remain visible,
|
|
// we need to match the slot to a route that returns null to close the modal.
|
|
|
|
export default function ModalCartCatchAll() {
|
|
return (
|
|
<div id="cart-modal-catch-all">
|
|
<p>Cart Catch All</p>
|
|
</div>
|
|
)
|
|
}
|