I have a user profile route like this /user/Mary/profile where I can see any users profile and I want to create an alias like /me/profile so that the user name parameter is hidden and use a constant instead for that parameter.
Something like:
const myUserName = 'Mike';
export default [
{
name: 'user',
path: 'user/:username',
alias: 'me',
component: () => import('components/user-layout'),
children: [
{
name: 'user-profile',
path: 'profile',
component: () => import('components/user-profile'),
},
],
},
];
I'm not sure if above is correct and how I should set the username parameter to the myUserName constant in case of user access /me/profile.
** I DON'T want to username param to be myUserName by default, it will be only in case of user access that route by the /me alias