diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-03 14:01:10 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-03 14:01:42 +0200 |
commit | d0e2733f63a7bd9601e73adee1107da804f85c41 (patch) | |
tree | 9268986d2ae72a55d84b9d9b90328fa58bb3bf98 /app/assets/javascripts/components/actions | |
parent | f24cb32e99afdb9fa31067fb647912fec92e9ed4 (diff) |
Fix reblogs of reblogs in UI, add follow form in UI
Diffstat (limited to 'app/assets/javascripts/components/actions')
-rw-r--r-- | app/assets/javascripts/components/actions/follow.jsx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/assets/javascripts/components/actions/follow.jsx b/app/assets/javascripts/components/actions/follow.jsx index 1c4e2c66a..a09aded83 100644 --- a/app/assets/javascripts/components/actions/follow.jsx +++ b/app/assets/javascripts/components/actions/follow.jsx @@ -6,41 +6,41 @@ export const FOLLOW_SUBMIT_REQUEST = 'FOLLOW_SUBMIT_REQUEST'; export const FOLLOW_SUBMIT_SUCCESS = 'FOLLOW_SUBMIT_SUCCESS'; export const FOLLOW_SUBMIT_FAIL = 'FOLLOW_SUBMIT_FAIL'; -export function followChange(text) { +export function changeFollow(text) { return { type: FOLLOW_CHANGE, text: text }; } -export function followSubmit() { +export function submitFollow() { return function (dispatch, getState) { - dispatch(followSubmitRequest()); + dispatch(submitFollowRequest()); api(getState).post('/api/follows', { uri: getState().getIn(['follow', 'text']) }).then(function (response) { - dispatch(followSubmitSuccess(response.data)); + dispatch(submitFollowSuccess(response.data)); }).catch(function (error) { - dispatch(followSubmitFail(error)); + dispatch(submitFollowFail(error)); }); }; } -export function followSubmitRequest() { +export function submitFollowRequest() { return { type: FOLLOW_SUBMIT_REQUEST }; } -export function followSubmitSuccess(account) { +export function submitFollowSuccess(account) { return { type: FOLLOW_SUBMIT_SUCCESS, account: account }; } -export function followSubmitFail(error) { +export function submitFollowFail(error) { return { type: FOLLOW_SUBMIT_FAIL, error: error |