Update preview logic to handle multi-locale
joelvarty opened this issue · 0 comments
joelvarty commented
Replace the handlePreview() function with the one in this file. Here we’re just passing the lang query string into the redirection function.
- https://github.com/joelvarty/next-blog-feb-23/blob/main/util/handle-preview.js
Update the pages/api/preview handler with this file. This assumes that the customer is using path-based language routing, not domain based. Need to update that code to work with both types. - https://github.com/joelvarty/next-blog-feb-23/blob/main/pages/api/preview.js