Closed ssolanki closed 1 year ago
I want to show a different page on the same route(/login) for mobile and desktop based on the userAgent. In my pages folder, I have two different page components login and loginMobile.
/login
login
loginMobile
This is my routes.js file:
routes.js
module.exports = routes() // login page .add("login") // .add("loginMobile")
I am using express server and importing routes like this:
const routes = require("../routes") const dev = process.env.NODE_ENV !== "production" const app = next({ dev }) const handler = routes.getRequestHandler(app)
I want to show a different page on the same route(
/login
) for mobile and desktop based on the userAgent. In my pages folder, I have two different page componentslogin
andloginMobile
.This is my
routes.js
file:I am using express server and importing routes like this: