Skip to content

Janpot/next-redirect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Redirect

Redirect for next.js. Works on both the client and server

Usage

static async getInitialProps (ctx) {
	const [ err, course ] = await poss(loadCourse(ctx.query.course))
	if (err) return redirect(ctx, '/')
	return course
}

Installation

npm install next-redirect

License

MIT

About

Redirect for next.js. Works on both the client and server

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages