diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-06-05 18:47:33 -0400 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-06-05 18:47:33 -0400 |
| commit | 3c902c73a66eb591fe9ba01922f2cc23270f85b9 (patch) | |
| tree | 461a69ef49fe32e61fe6aa000ab74d4d6c4510d5 | |
| parent | 308ff45c1c8c16177beb0b94390d151b2ec7681d (diff) | |
sorting
| -rw-r--r-- | client/src/lib/db/backupDB.js | 2 | ||||
| -rw-r--r-- | client/src/lib/views/information.js | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/client/src/lib/db/backupDB.js b/client/src/lib/db/backupDB.js index 3df1c68..2ba34f0 100644 --- a/client/src/lib/db/backupDB.js +++ b/client/src/lib/db/backupDB.js @@ -23,7 +23,7 @@ export const backupDB = { "disabled": false, "__index": 1, "dateCreated": "Thu, 11 May 2017 11:39:53 GMT", - "credit": "Unknown\r\n" + "credit": "Camera Obscura, French Encyclopédie, Denis Diderot, c. 1751-1772" }, { "id": "god-s-all-seeing-eye", 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}> |
