EDIT LOCATION
n our project, we have used optional parameters in some cases like for profile page /u/:username/:tab?, I couldn't find any way to achieve this using next routes. Only way I could find was to add folder in following structures and put same index.js in 2 folders, that contradicts the DRY principle and makes redundant codes n our project, we have used optional parameters in some cases like for profile page /u/:username/:tab?, I couldn't find any way to achieve this using next routes. Only way I could find was to add folder in following structures and put same index.js in 2 folders, that contradicts the DRY principle and makes redundant codes n our project, we have used optional parameters in some cases like for profile page /u/:username/:tab?, I couldn't find any way to achieve this using next routes. Only way I could find was to add folder in following structures and put same index.js in 2 folders, that contradicts the DRY principle and makes redundant codes n our project, we have used optional parameters in some cases like for profile page /u/:username/:tab?, I couldn't find any way to achieve this using next routes. Only way I could find was to add folder in following structures and put same index.js in 2 folders, that contradicts the DRY principle and makes redundant codes n our project, we have used optional parameters in some cases like for profile page /u/:username/:tab?, I couldn't find any way to achieve this using next routes. Only way I could find was to add folder in following structures and put same index.js in 2 folders, that contradicts the DRY principle and makes redundant codes n our project, we have used optional parameters in some cases like for profile page /u/:username/:tab?, I couldn't find any way to achieve this using next routes. Only way I could find was to add folder in following structures and put same index.js in 2 folders, that contradicts the DRY principle and makes redundant codes n our project, we have used optional parameters in some cases like for profile page /u/:username/:tab?, I couldn't find any way to achieve this using next routes. Only way I could find was to add folder in following structures and put same index.js in 2 folders, that contradicts the DRY principle and makes redundant codes