Draft implementation of sessions.
- Introduce react-router & add some pages.
- Add login page (does nothing).
- Allow creating a new session.
- Allow adding notes into a session.
import Immutable from 'immutable';
// import PouchDB from 'pouchdb';
import * as types from '../constants/actionTypes';
import noteRecord from '../store/noteRecord';
// const db = new PouchDB('notes');
// db.allDocs({ include_docs: true, descending: true }, function(err, doc) {
// console.log(doc.rows)
// });
export default (state = Immutable.List([]), action) => {
switch (action.type) {
case types.ADD_NOTE:
return state.push(new noteRecord(action.note));
default:
return state;
}
};