mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
14 lines
351 B
JavaScript
14 lines
351 B
JavaScript
|
import { RULES_FETCH_SUCCESS } from 'flavours/glitch/actions/rules';
|
||
|
import { List as ImmutableList, fromJS } from 'immutable';
|
||
|
|
||
|
const initialState = ImmutableList();
|
||
|
|
||
|
export default function rules(state = initialState, action) {
|
||
|
switch (action.type) {
|
||
|
case RULES_FETCH_SUCCESS:
|
||
|
return fromJS(action.rules);
|
||
|
default:
|
||
|
return state;
|
||
|
}
|
||
|
}
|