Improving statuses, adding a composer drawer, which doesn't work yet

This commit is contained in:
Eugen Rochko
2016-08-25 19:52:55 +02:00
parent f5e1127894
commit 44e57f64dd
14 changed files with 138 additions and 12 deletions

View File

@ -1,5 +1,8 @@
import fetch from 'isomorphic-fetch'
export const SET_TIMELINE = 'SET_TIMELINE';
export const ADD_STATUS = 'ADD_STATUS';
export const PUBLISH = 'PUBLISH';
export function setTimeline(timeline, statuses) {
return {
@ -16,3 +19,15 @@ export function addStatus(timeline, status) {
status: status
};
}
export function publish(text, in_reply_to_id) {
return function (dispatch) {
return fetch('/api/statuses', {
method: 'POST'
}).then(function (response) {
return response.json();
}).then(function (json) {
console.log(json);
});
};
}