mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
21 lines
452 B
JavaScript
21 lines
452 B
JavaScript
import {
|
|
GLOBAL_ACTIVITIES_DATA,
|
|
MORE_GLOBAL_ACTIVITIES
|
|
} from "../../app/action_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;
|
|
}
|