summaryrefslogtreecommitdiff
path: root/client/src/lib/views/information.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-06-05 18:47:33 -0400
committerJules Laplace <julescarbon@gmail.com>2017-06-05 18:47:33 -0400
commit3c902c73a66eb591fe9ba01922f2cc23270f85b9 (patch)
tree461a69ef49fe32e61fe6aa000ab74d4d6c4510d5 /client/src/lib/views/information.js
parent308ff45c1c8c16177beb0b94390d151b2ec7681d (diff)
sorting
Diffstat (limited to 'client/src/lib/views/information.js')
-rw-r--r--client/src/lib/views/information.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/lib/views/information.js b/client/src/lib/views/information.js
index 1f3fc72..20b0929 100644
--- a/client/src/lib/views/information.js
+++ b/client/src/lib/views/information.js
@@ -57,7 +57,9 @@ export default class Information extends Component {
}
render() {
const content = this.props.content
- const essays = this.props.essays.map( (essay, i) => {
+ const essays = this.props.essays.sort( (a,b) => {
+ return a.__index < b.__index ? -1 : a.__index === b.__index ? 0 : 1
+ }).map( (essay, i) => {
return (
<Touchable key={i} onPress={() => this.showEssay(essay)}>
<View style={styles.essayContainer}>