Files
hrmnyandGitHub 7eccedc2f9 fix(turbopack): intercepting routes should have default slots (#69929)
### 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
2024-09-17 15:01:14 +02:00

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>
)
}