From 588628fca13ac1d939ddda0454ea3ba2fbf54825 Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Tue, 27 Oct 2020 03:38:28 -0500 Subject: [PATCH] Moved search rewrites --- next.config.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/next.config.js b/next.config.js index 2121e5fb3..e8c9ddb21 100644 --- a/next.config.js +++ b/next.config.js @@ -11,6 +11,17 @@ module.exports = { }, rewrites() { return [ + { + source: '/checkout', + destination: '/api/bigcommerce/checkout', + }, + // The logout is also an action so this route is not required, but it's also another way + // you can allow a logout! + { + source: '/logout', + destination: '/api/bigcommerce/customers/logout?redirect_to=/', + }, + // Rewrites for /search { source: '/:locale/search', destination: '/search', @@ -27,22 +38,11 @@ module.exports = { source: '/search/designers/:name/:category', destination: '/search', }, - // Search { // This rewrite will also handle `/search/designers` source: '/search/:category', destination: '/search', }, - { - source: '/checkout', - destination: '/api/bigcommerce/checkout', - }, - // The logout is also an action so this route is not required, but it's also another way - // you can allow a logout! - { - source: '/logout', - destination: '/api/bigcommerce/customers/logout?redirect_to=/', - }, ] }, }