mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
21 lines
446 B
JavaScript
21 lines
446 B
JavaScript
import {
|
|
GLOBAL_ACTIVITIES_DATA,
|
|
MORE_GLOBAL_ACTIVITIES
|
|
} from "../actions/types";
|
|
|
|
export function globalActivities(
|
|
state = { more: true, activities: [] },
|
|
action
|
|
) {
|
|
if (action.type === GLOBAL_ACTIVITIES_DATA) {
|
|
return {
|
|
...state,
|
|
activities: [
|
|
...state.activities,
|
|
...action.payload.global_activities.activities
|
|
],
|
|
more: action.payload.global_activities.more
|
|
};
|
|
}
|
|
return state;
|
|
}
|