client/src/actions/notesActions.js
author Alexandre Segura <mex.zktk@gmail.com>
Thu, 08 Jun 2017 11:13:41 +0200
changeset 21 284e866f55c7
parent 17 877d8796b86d
child 26 930e486ad0a8
permissions -rw-r--r--
First version of categories tooltip. - Use react-portal to display hovering menu. - Add custom Mark to store category data.

import uuidV1 from 'uuid/v1';

import * as types from '../constants/actionTypes';

export const addNote = (session, data) => {
  return {
    type: types.ADD_NOTE,
    note: {
      id: uuidV1(),
      session: session.id,
      raw: data.raw,
      plain: data.plain,
      html: data.html,
      startedAt: data.startedAt,
      finishedAt: data.finishedAt
    }
  };
}