Skip to content

Commit

Permalink
📝 Update permanent redirections (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliencrn authored Mar 21, 2024
1 parent a749699 commit 2e03935
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 30 deletions.
21 changes: 20 additions & 1 deletion apps/www/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
import './env.js'

const deletedHooks = [
'use-debounce',
'use-effect-once',
'use-element-size',
'use-fetch',
'use-image-on-load',
'use-is-first-render',
'use-locked-body',
'use-update-effect',
]

/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
async redirects() {
return deletedHooks.map(slug => ({
source: `/react-hook/${slug}`,
destination: '/migrate-to-v3#removed-hooks',
permanent: true,
}))
},
}

export default nextConfig
29 changes: 0 additions & 29 deletions apps/www/src/middleware.ts

This file was deleted.

0 comments on commit 2e03935

Please sign in to comment.