Redirect for next.js. Works on both the client and server
static async getInitialProps (ctx) {
const [ err, course ] = await poss(loadCourse(ctx.query.course))
if (err) return redirect(ctx, '/')
return course
}
npm install next-redirect
MIT
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Redirect for next.js. Works on both the client and server
static async getInitialProps (ctx) {
const [ err, course ] = await poss(loadCourse(ctx.query.course))
if (err) return redirect(ctx, '/')
return course
}
npm install next-redirect
MIT