gen | Warning: 2 duplicate routes have been detected, only the route(s) closest to the top of the file will be used.
gen | -> Name: "undefined", Path: "/", Page: "undefined"
gen | -> Name: "undefined", Path: "undefined", Page: "NotFoundPage"
It is just a warning, so the way you’re doing it should be ok, but you are correct in that the TypeScript definition of a Route doesn’t allow you to define redirect as well as name as props. I will discuss with the team and get a fix in.
I have a similar question and would love to get some feedback on the optimal approach, and how I should set things up from a redwood perspective. Thank you in advance.
Context
I have two applications hosted on two different domain names:
Application 1 (a1) hosted on domain 1 (d1 a .com tld)
Application 2 (a2) hosted on domain 2 (d2 a .gg tld)
a1 is a marketing app and a2 is a user profile app
a1 Marketing App
The marketing site on d1 is set-up as follows:
Marketing Splash page on the home page
Marketing About page at d1/about
Marketing Blog at d1/blog
Etc.
a2 User Profiles App
User profiles are hosted on d2 as follows:
d2/userhandle, where each user has a unique userhandle
d2 does not have a Splash/Home page, About page, or Blog page or any other page that could conflict with d1
Requirements
When a user visits d2 home/index route, I want the content on d1 (the Splash page) to be shown but for the webaddress to show as d2 (i.e. d1 masked)
When a user visits d2/about, I want the content on d1/about to be shown but for the webaddress to show as d2/about
When a user visits d2/blog, I want the content on d1/blog to be shown but for the webaddress to show as d2/blog
Etc.
I have a couple of questions about this:
Is this a good idea? Main motivation is that I want to separate the marketing and user applications.
How should I go about setting this up in redwood. Anything specific I need to consider other than domain redirects?