Added Explore page with Gab Trends partner data

• Added:
- Explore page with Gab Trends partner data
This commit is contained in:
mgabdev
2020-07-01 22:39:43 -04:00
parent 96ee203a54
commit f3b57b5810
15 changed files with 342 additions and 41 deletions

View File

@@ -1,5 +1,4 @@
import api from '../api';
import { me } from '../initial_state'
import api from '../api'
export const GAB_TRENDS_RESULTS_FETCH_REQUEST = 'GAB_TRENDS_RESULTS_FETCH_REQUEST'
export const GAB_TRENDS_RESULTS_FETCH_SUCCESS = 'GAB_TRENDS_RESULTS_FETCH_SUCCESS'
@@ -9,8 +8,8 @@ export const fetchGabTrends = (feedType) => {
return function (dispatch, getState) {
dispatch(fetchGabTrendsRequest(feedType))
api(getState).get(`/api/v1/gab_trends?type=${feedType}`).then(response => {
dispatch(fetchGabTrendsSuccess(response.data.items, feedType))
api(getState).get(`/api/v1/gab_trends?type=${feedType}`).then((response) => {
dispatch(fetchGabTrendsSuccess(response.data, feedType))
}).catch(function (error) {
dispatch(fetchGabTrendsFail(error, feedType))
})