Fix signup tos redirr

This commit is contained in:
Roj Serbest 2021-11-12 20:11:05 +03:00
parent 0c3c740587
commit 4b50a03e63
1 changed files with 4 additions and 11 deletions

View File

@ -65,17 +65,6 @@ class Component extends React.Component<RouteProps> {
}, this.props)
}
componentDidMount() {
dispatch(
() => {
if (!this.props.query?.tosId) {
this.props.navigate('/tos', { replace: true })
}
},
{ ...this.props }
)
}
render() {
return (
<Box
@ -146,6 +135,10 @@ export default function SignUp() {
React.useEffect(() => {
redirectIfAuthenticated(navigate)
if (!query?.tosId) {
navigate('/tos', { replace: true })
}
})
return <Component navigate={navigate} snackbar={snackbar} query={query} />