When switching between page and subpage on Pages we get Page not found error because there are duplicate cookies set by nextjs setPreviewData function on each page route. There should be single active preview cookie at the root of your session.
Testing Details
[ ] Unit Test Added
[x] Manual Test/Other (Please elaborate)
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description / Motivation
When switching between page and subpage on Pages we get Page not found error because there are duplicate cookies set by nextjs
setPreviewData
function on each page route. There should be single active preview cookie at the root of your session.Testing Details
Types of changes