Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodlenet
MoodleNet Frontend
Commits
c358bf96
Commit
c358bf96
authored
Oct 18, 2018
by
Sam Gluck
Browse files
Scroll on user navigation on sign up
parent
2b8b376f
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/apollo/client.tsx
View file @
c358bf96
...
...
@@ -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
...
...
src/containers/App/ProtectedRoute.tsx
View file @
c358bf96
...
...
@@ -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
=
{
{
...
...
src/pages/sign-up/SignUp.tsx
View file @
c358bf96
...
...
@@ -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
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment