From a36d71850ab1c84d59f23c2c0e90bc1270dc548c Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Fri, 28 Jun 2024 13:25:01 +0200 Subject: [PATCH] Fix Routes and paths for newsletter listing Paths don't support regexps any more https://reactrouter.com/en/main/upgrading/v5#note-on-route-path-patterns [MAILPOE-3911] --- .../assets/js/src/newsletters/newsletters.jsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/mailpoet/assets/js/src/newsletters/newsletters.jsx b/mailpoet/assets/js/src/newsletters/newsletters.jsx index 3430df07ef..4cc58d00e0 100644 --- a/mailpoet/assets/js/src/newsletters/newsletters.jsx +++ b/mailpoet/assets/js/src/newsletters/newsletters.jsx @@ -63,7 +63,7 @@ const Tabs = withNpsPoll(() => { > @@ -71,7 +71,7 @@ const Tabs = withNpsPoll(() => { @@ -83,7 +83,7 @@ const Tabs = withNpsPoll(() => { @@ -131,7 +131,15 @@ const routes = [ children: withBoundary(Tabs), }, { - path: '/(standard|notification|re_engagement)/(.*)?', + path: '/standard/*', + children: withBoundary(Tabs), + }, + { + path: '/notification/*', + children: withBoundary(Tabs), + }, + { + path: '/re_engagement/*', children: withBoundary(Tabs), }, /* New newsletter: types */ @@ -212,10 +220,9 @@ function App() { } /> ))}