joplin/ReactNativeClient/lib/components/note-list.js

26 lines
593 B
JavaScript
Raw Normal View History

2017-05-15 19:10:00 +00:00
import React, { Component } from 'react';
import { connect } from 'react-redux'
import { ListView, Text, TouchableHighlight } from 'react-native';
2017-06-24 18:06:28 +00:00
import { Log } from 'lib/log.js';
import { ItemListComponent } from 'lib/components/item-list.js';
import { _ } from 'lib/locale.js';
2017-05-15 19:10:00 +00:00
2017-05-15 19:46:34 +00:00
class NoteListComponent extends ItemListComponent {
2017-06-06 20:01:43 +00:00
listView_itemPress(noteId) {
2017-05-15 19:46:34 +00:00
this.props.dispatch({
type: 'Navigation/NAVIGATE',
routeName: 'Note',
noteId: noteId,
});
}
}
2017-05-15 19:10:00 +00:00
const NoteList = connect(
(state) => {
return { items: state.notes };
}
)(NoteListComponent)
export { NoteList };