Removed unused hashtag redux

• Removed:
- unused hashtag redux
This commit is contained in:
mgabdev
2020-11-09 01:31:32 -06:00
parent 380042cb7a
commit 2d1fdcf6fb
3 changed files with 0 additions and 68 deletions

View File

@@ -1,39 +0,0 @@
import api from '../api';
export const HASHTAGS_FETCH_REQUEST = 'HASHTAGS_FETCH_REQUEST';
export const HASHTAGS_FETCH_SUCCESS = 'HASHTAGS_FETCH_SUCCESS';
export const HASHTAGS_FETCH_FAIL = 'HASHTAGS_FETCH_FAIL';
export function fetchHashtags() {
return (dispatch, getState) => {
dispatch(fetchHashtagsRequest());
api(getState).get('/api/v1/trends').then(response => {
dispatch(fetchHashtagsSuccess(response.data));
}).catch(error => dispatch(fetchHashtagsFail(error)));
};
};
export function fetchHashtagsRequest() {
return {
type: HASHTAGS_FETCH_REQUEST,
skipLoading: true,
};
};
export function fetchHashtagsSuccess(tags) {
return {
tags,
type: HASHTAGS_FETCH_SUCCESS,
skipLoading: true,
};
};
export function fetchHashtagsFail(error) {
return {
error,
type: HASHTAGS_FETCH_FAIL,
skipLoading: true,
skipAlert: true,
};
};