Commit c358bf96 authored by Sam Gluck's avatar Sam Gluck
Browse files

Scroll on user navigation on sign up

parent 2b8b376f
......@@ -63,10 +63,10 @@ export default new ApolloClient({
user: {
__typename: 'User',
// TODO reinstate after dev
// isAuthenticated: false,
// data: null,
isAuthenticated: true,
data: DUMMY_USER
isAuthenticated: false,
data: null
// isAuthenticated: true,
// data: DUMMY_USER
}
},
resolvers
......
......@@ -13,10 +13,9 @@ function ProtectedRoute({ component: Component, data, ...rest }) {
<Route
{...rest}
render={(props: ProtectedRouteProps) => {
// TODO reinstate after dev
// if (data.user.isAuthenticated) {
return <Component {...props} />;
// }
if (data.user.isAuthenticated) {
return <Component {...props} />;
}
return (
<Redirect
to={{
......
......@@ -261,6 +261,7 @@ export default class SignUp extends React.Component<SignUpProps, SignUpState> {
componentWillReceiveProps(nextProps) {
this.state.currentStep = Number(nextProps.match.params.step);
this.scrollForStep(this.state.currentStep);
}
getStepComponent() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment