fix: Embed - Better support for layout config(without flash of default toggle) (#9714)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2023-06-26 17:24:19 +02:00
1 parent 6adaf0d3e8
commit 4ada428bcb
8 files changed
+226 -48

No files matched your search

+3 -3
View File
@@ -100,7 +100,7 @@ plugins.push(withAxiom);
const userTypeRouteRegExp = `/:user((?!${pages.join("/|")})[^/]*)/:type((?!book$)[^/]+)`;
const teamTypeRouteRegExp = "/team/:slug/:type((?!book$)[^/]+)";
const privateLinkRouteRegExp = "/d/:link/:slug((?!book$)[^/]+)";
const embedUserTypeRouteRegExp = `/:user((?!${pages.join("|")}).*)/:type/embed`;
const embedUserTypeRouteRegExp = `/:user((?!${pages.join("/|")})[^/]*)/:type/embed`;
const embedTeamTypeRouteRegExp = "/team/:slug/:type/embed";
/** @type {import("next").NextConfig} */
@@ -312,11 +312,11 @@ const nextConfig = {
afterFiles.push(
...[
{
source: `/:user((?!${pages.join("|")}).*)/:type/embed`,
source: embedUserTypeRouteRegExp,
destination: "/new-booker/:user/:type/embed",
},
{
source: "/team/:slug/:type/embed",
source: embedTeamTypeRouteRegExp,
destination: "/new-booker/team/:slug/:type/embed",
},
]