Added Explore page with Gab Trends partner data
• Added: - Explore page with Gab Trends partner data
This commit is contained in:
@@ -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))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user