* update to eslint 6.8.0 and related packages * Fixes for no-prototype-builtins * Updates for explicit-function-return-type * Add ignores for no-explicit-any * update to eslint 6.8.0 and related packages * Fixes for no-prototype-builtins * Updates for explicit-function-return-type * Add ignores for no-explicit-any * package: activate eslint-config-standard * apply updated eslint configuration * lint: apply eslint feedback after rebase * Update lockfile * Update lockfile * Restore missing deps * Update lockfile * Re-add eslint-plugin-node * Add eslint-plugin-standard and eslint-plugin-react-hooks * Clean lint Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
16 lines
392 B
TypeScript
16 lines
392 B
TypeScript
import { navigate } from 'gatsby'
|
|
|
|
export default function redirectLegacyRoutes(): void {
|
|
const { hash } = window.location
|
|
if (hash && hash.startsWith('#/examples/')) {
|
|
const category = hash.replace('#/examples/', '')
|
|
navigate(`category/${category}`, {
|
|
replace: true,
|
|
})
|
|
} else if (hash === '#/endpoint') {
|
|
navigate('endpoint', {
|
|
replace: true,
|
|
})
|
|
}
|
|
}
|