diff --git a/examples/custom-server-express/server.js b/examples/custom-server-express/server.js index 7a766b284aac6..c047a2964ab77 100644 --- a/examples/custom-server-express/server.js +++ b/examples/custom-server-express/server.js @@ -10,11 +10,11 @@ app.prepare().then(() => { const server = express() server.get('/a', (req, res) => { - return app.render(req, res, '/b', req.query) + return app.render(req, res, '/a', req.query) }) server.get('/b', (req, res) => { - return app.render(req, res, '/a', req.query) + return app.render(req, res, '/b', req.query) }) server.get('/posts/:id', (req, res) => { diff --git a/examples/custom-server-fastify/server.js b/examples/custom-server-fastify/server.js index f433da940b8a5..e5e4b62a2fe37 100644 --- a/examples/custom-server-fastify/server.js +++ b/examples/custom-server-fastify/server.js @@ -18,13 +18,13 @@ fastify.register((fastify, opts, next) => { } fastify.get('/a', (req, reply) => { - return app.render(req.req, reply.res, '/b', req.query).then(() => { + return app.render(req.req, reply.res, '/a', req.query).then(() => { reply.sent = true }) }) fastify.get('/b', (req, reply) => { - return app.render(req.req, reply.res, '/a', req.query).then(() => { + return app.render(req.req, reply.res, '/b', req.query).then(() => { reply.sent = true }) }) diff --git a/examples/custom-server-koa/server.js b/examples/custom-server-koa/server.js index 2d2a54843dc64..236dff76395e9 100644 --- a/examples/custom-server-koa/server.js +++ b/examples/custom-server-koa/server.js @@ -12,12 +12,12 @@ app.prepare().then(() => { const router = new Router() router.get('/a', async ctx => { - await app.render(ctx.req, ctx.res, '/b', ctx.query) + await app.render(ctx.req, ctx.res, '/a', ctx.query) ctx.respond = false }) router.get('/b', async ctx => { - await app.render(ctx.req, ctx.res, '/a', ctx.query) + await app.render(ctx.req, ctx.res, '/b', ctx.query) ctx.respond = false }) diff --git a/examples/custom-server-nodemon/server/index.js b/examples/custom-server-nodemon/server/index.js index f7286993e5c43..ef482846e15ab 100644 --- a/examples/custom-server-nodemon/server/index.js +++ b/examples/custom-server-nodemon/server/index.js @@ -13,9 +13,9 @@ app.prepare().then(() => { const { pathname, query } = parsedUrl if (pathname === '/a') { - app.render(req, res, '/b', query) - } else if (pathname === '/b') { app.render(req, res, '/a', query) + } else if (pathname === '/b') { + app.render(req, res, '/b', query) } else { handle(req, res, parsedUrl) } diff --git a/examples/custom-server-polka/server.js b/examples/custom-server-polka/server.js index e29a1da7d47df..6ce23cceb4d29 100644 --- a/examples/custom-server-polka/server.js +++ b/examples/custom-server-polka/server.js @@ -9,9 +9,9 @@ const handle = app.getRequestHandler() app.prepare().then(() => { const server = polka() - server.get('/a', (req, res) => app.render(req, res, '/b', req.query)) + server.get('/a', (req, res) => app.render(req, res, '/a', req.query)) - server.get('/b', (req, res) => app.render(req, res, '/a', req.query)) + server.get('/b', (req, res) => app.render(req, res, '/b', req.query)) server.get('*', (req, res) => handle(req, res)) diff --git a/examples/custom-server/server.js b/examples/custom-server/server.js index f7286993e5c43..ef482846e15ab 100644 --- a/examples/custom-server/server.js +++ b/examples/custom-server/server.js @@ -13,9 +13,9 @@ app.prepare().then(() => { const { pathname, query } = parsedUrl if (pathname === '/a') { - app.render(req, res, '/b', query) - } else if (pathname === '/b') { app.render(req, res, '/a', query) + } else if (pathname === '/b') { + app.render(req, res, '/b', query) } else { handle(req, res, parsedUrl) }