I am working in a project with NextJS and I have finished the desktop version, when it comes to the mobile version my client doesn't want the responsive layout of desktop version but he wants another pages which are completly diffrents. For exemple the content of home page in the desktopn version is not the same for mobile users.
So my questios are:
- How can I detect the useragent then return the specific page regarding to which device the user is using ?
- How should I structure the code ? should I create two 'src' folder, one for each version of code ?
Thanks in advance.
You can detect if a user from mobile device or desktop by using library "mobile-detect"