Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Mobile
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
113
Issues
113
List
Boards
Labels
Service Desk
Milestones
Merge Requests
11
Merge Requests
11
Registry
Registry
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Commits
d81c6530
Commit
d81c6530
authored
1 week ago
by
Juan Manuel Solaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat) add empty message to my blogs list
parent
fba11156
master
v3.7.0
1 merge request
!232
[Sprint/HipsterHedgehog] (feat) Add empty message to my blogs list
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
2 deletions
+55
-2
BlogsListScreen.js.snap
__tests__/blogs/__snapshots__/BlogsListScreen.js.snap
+40
-0
en.json
locales/en.json
+2
-1
es.json
locales/es.json
+2
-1
BlogsListScreen.js
src/blogs/BlogsListScreen.js
+11
-0
No files found.
__tests__/blogs/__snapshots__/BlogsListScreen.js.snap
View file @
d81c6530
...
...
@@ -2,6 +2,46 @@
exports[`blog list screen component should renders correctly 1`] = `
<RCTScrollView
ListEmptyComponent={
<View
style={
Object {
"alignItems": "center",
"flex": 1,
"flexDirection": "row",
"height": 667,
"justifyContent": "center",
}
}
>
<View
style={
Object {
"alignItems": "center",
"flex": 1,
"flexDirection": "column",
"justifyContent": "center",
}
}
>
<Text
style={
Object {
"color": "#888",
"fontFamily": "Roboto",
"fontSize": 24,
"fontWeight": "200",
"marginBottom": 8,
"marginTop": 8,
"textAlign": "center",
}
}
>
This list is empty
</Text>
</View>
</View>
}
ListFooterComponent={null}
ListHeaderComponent={
<View>
...
...
This diff is collapsed.
Click to expand it.
locales/en.json
View file @
d81c6530
...
...
@@ -95,7 +95,8 @@
"tabMyBlogs"
:
"MY BLOGS"
,
"errorLoading"
:
"There was an error loading this blog."
,
"error"
:
"SORRY, WE COULDN'T LOAD THE BLOG"
,
"blogs"
:
"Blogs"
"blogs"
:
"Blogs"
,
"blogListEmpty"
:
"This list is empty"
},
"boosts"
:{
"selected"
:
"SELECTED"
,
...
...
This diff is collapsed.
Click to expand it.
locales/es.json
View file @
d81c6530
...
...
@@ -89,7 +89,8 @@
"tabMyBlogs"
:
"MI BLOG"
,
"blogs"
:
"Blog"
,
"errorLoading"
:
"Error cargando este blog."
,
"error"
:
"PERDON, NO PUEDO CARGAR ESTE BLOG"
"error"
:
"PERDON, NO PUEDO CARGAR ESTE BLOG"
,
"blogListEmpty"
:
"Esta lista está vacía"
},
"boosts"
:
{
"selected"
:
"SELECCIONADO"
,
...
...
This diff is collapsed.
Click to expand it.
src/blogs/BlogsListScreen.js
View file @
d81c6530
...
...
@@ -7,6 +7,7 @@ import {
FlatList
,
ActivityIndicator
,
StyleSheet
,
Text
}
from
'
react-native
'
;
import
{
...
...
@@ -18,6 +19,7 @@ import BlogCard from './BlogCard';
import
Toolbar
from
'
../common/components/toolbar/Toolbar
'
;
import
TagsSubBar
from
'
../newsfeed/topbar/TagsSubBar
'
;
import
{
CommonStyle
as
CS
}
from
'
../styles/Common
'
;
import
{
ComponentsStyle
}
from
'
../styles/Components
'
;
import
{
MINDS_CDN_URI
,
MINDS_FEATURES
}
from
'
../config/Config
'
;
import
ErrorLoading
from
'
../common/components/ErrorLoading
'
;
import
{
withErrorBoundary
}
from
'
../common/components/ErrorBoundary
'
;
...
...
@@ -122,13 +124,22 @@ export default class BlogsListScreen extends Component {
* Render
*/
render
()
{
let
empty
=
null
;
const
store
=
this
.
props
.
blogs
;
const
footer
=
this
.
getFooter
()
empty
=
(
<
View
style
=
{
ComponentsStyle
.
emptyComponentContainer
}
>
<
View
style
=
{
ComponentsStyle
.
emptyComponent
}
>
<
Text
style
=
{
ComponentsStyle
.
emptyComponentMessage
}
>
{
i18n
.
t
(
'
blogs.blogListEmpty
'
)}
<
/Text
>
<
/View
>
<
/View>
)
;
return
(
<
FlatList
data
=
{
store
.
list
.
entities
.
slice
()}
ListEmptyComponent
=
{
!
this
.
props
.
blogs
.
list
.
loaded
&&
!
this
.
props
.
blogs
.
list
.
refreshing
?
null
:
empty
}
removeClippedSubviews
onRefresh
=
{
this
.
refresh
}
refreshing
=
{
store
.
list
.
refreshing
}
...
...
This diff is collapsed.
Click to expand it.
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