Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
eb9abd23
Unverified
Commit
eb9abd23
authored
Sep 25, 2018
by
Benjamin Wheeler
Committed by
GitHub
Sep 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed errors in splash page that appear in develop (#2077)
parent
935eb0b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
src/redux/splash.js
src/redux/splash.js
+10
-10
src/views/splash/presentation.jsx
src/views/splash/presentation.jsx
+1
-2
No files found.
src/redux/splash.js
View file @
eb9abd23
...
...
@@ -77,13 +77,13 @@ module.exports.getActivity = (username, token) => (dispatch => {
api
({
uri
:
`/users/
${
username
}
/following/users/activity?limit=5`
,
authentication
:
token
},
(
err
,
body
)
=>
{
},
(
err
,
body
,
res
)
=>
{
if
(
err
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
activity
'
,
module
.
exports
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
err
));
return
;
}
if
(
typeof
body
===
'
undefined
'
)
{
if
(
typeof
body
===
'
undefined
'
||
res
.
statusCode
!==
200
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
activity
'
,
module
.
exports
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
'
No session content
'
));
return
;
...
...
@@ -100,13 +100,13 @@ module.exports.getFeaturedGlobal = () => (dispatch => {
dispatch
(
module
.
exports
.
setFetchStatus
(
'
featured
'
,
module
.
exports
.
Status
.
FETCHING
));
api
({
uri
:
'
/proxy/featured
'
},
(
err
,
body
)
=>
{
},
(
err
,
body
,
res
)
=>
{
if
(
err
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
featured
'
,
module
.
exports
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
err
));
return
;
}
if
(
typeof
body
===
'
undefined
'
)
{
if
(
typeof
body
===
'
undefined
'
||
res
.
statusCode
!==
200
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
featured
'
,
module
.
exports
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
'
No session content
'
));
return
;
...
...
@@ -126,13 +126,13 @@ module.exports.getSharedByFollowing = (username, token) => (dispatch => {
api
({
uri
:
`/users/
${
username
}
/following/users/projects`
,
authentication
:
token
},
(
err
,
body
)
=>
{
},
(
err
,
body
,
res
)
=>
{
if
(
err
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
shared
'
,
module
.
exports
.
Status
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
err
));
return
;
}
if
(
typeof
body
===
'
undefined
'
)
{
if
(
typeof
body
===
'
undefined
'
||
res
.
statusCode
!==
200
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
shared
'
,
module
.
exports
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
'
No session content
'
));
return
;
...
...
@@ -152,13 +152,13 @@ module.exports.getInStudiosFollowing = (username, token) => (dispatch => {
api
({
uri
:
`/users/
${
username
}
/following/studios/projects`
,
authentication
:
token
},
(
err
,
body
)
=>
{
},
(
err
,
body
,
res
)
=>
{
if
(
err
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
studios
'
,
module
.
exports
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
err
));
return
;
}
if
(
typeof
body
===
'
undefined
'
)
{
if
(
typeof
body
===
'
undefined
'
||
res
.
statusCode
!==
200
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
studios
'
,
module
.
exports
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
'
No session content
'
));
return
;
...
...
@@ -178,13 +178,13 @@ module.exports.getLovedByFollowing = (username, token) => (dispatch => {
api
({
uri
:
`/users/
${
username
}
/following/users/loves`
,
authentication
:
token
},
(
err
,
body
)
=>
{
},
(
err
,
body
,
res
)
=>
{
if
(
err
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
loved
'
,
module
.
exports
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
err
));
return
;
}
if
(
typeof
body
===
'
undefined
'
)
{
if
(
typeof
body
===
'
undefined
'
||
res
.
statusCode
!==
200
)
{
dispatch
(
module
.
exports
.
setFetchStatus
(
'
loved
'
,
module
.
exports
.
Status
.
ERROR
));
dispatch
(
module
.
exports
.
setError
(
'
No session content
'
));
return
;
...
...
src/views/splash/presentation.jsx
View file @
eb9abd23
...
...
@@ -495,7 +495,6 @@ class SplashPresentation extends React.Component { // eslint-disable-line react/
</
MediaQuery
>
])
:
[]
}
{
featured
}
{
this
.
props
.
isAdmin
?
[
...
...
@@ -555,7 +554,7 @@ SplashPresentation.propTypes = {
isAdmin
:
PropTypes
.
bool
.
isRequired
,
isEducator
:
PropTypes
.
bool
.
isRequired
,
lovedByFollowing
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
news
:
PropTypes
.
object
,
// eslint-disable-line react/forbid-prop-types
news
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
onDismiss
:
PropTypes
.
func
.
isRequired
,
onHideEmailConfirmationModal
:
PropTypes
.
func
.
isRequired
,
onRefreshHomepageCache
:
PropTypes
.
func
.
isRequired
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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