rsnext/examples/with-reason-relay/pages/index.js
Max Leon d34c9f16d8
Fixed issue accessing index page of "with-reason-relay" example (#23780)
Within the "with-reason-relay" example:
- Redirect from NextJS-routed root route to reason-compiled home



## Bug

- [x] Related issues linked using `fixes #23607 `
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #23607 `
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-07 19:18:56 +00:00

13 lines
200 B
JavaScript

import { useRouter } from 'next/router'
const Home = () => {
const router = useRouter()
if (typeof window !== 'undefined') {
router.push('/App.bs')
}
return null
}
export default Home