2023-01-26 06:50:16 +09:00
|
|
|
import { Map as ImmutableMap } from 'immutable';
|
2023-01-28 01:47:50 +09:00
|
|
|
import { ACTIVITYPUB_EXPLORER_DATA, ACTIVITYPUB_EXPLORER_URL } from '../actions/activitypub_explorer';
|
2023-01-26 06:50:16 +09:00
|
|
|
|
|
|
|
const initialState = ImmutableMap({
|
|
|
|
data: null,
|
2023-01-28 01:47:50 +09:00
|
|
|
url: '',
|
2023-01-26 06:50:16 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
export default function activitypub_explorer(state = initialState, action) {
|
|
|
|
switch (action.type) {
|
|
|
|
case ACTIVITYPUB_EXPLORER_DATA:
|
|
|
|
return state.set('data', action.value);
|
2023-01-28 01:47:50 +09:00
|
|
|
case ACTIVITYPUB_EXPLORER_URL:
|
|
|
|
return state.set('url', action.value);
|
2023-01-26 06:50:16 +09:00
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
}
|