~cytrogen/masto-fe

ref: 434712ea2279340f671bac234fdac264367f935a masto-fe/app/javascript/flavours/glitch/reducers/media_attachments.js -rw-r--r-- 396 bytes
434712ea — Cytrogen Convert glitch component SCSS to CSS custom properties (Phase 5+6) a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { Map as ImmutableMap } from "immutable";

import { STORE_HYDRATE } from "flavours/glitch/actions/store";

const initialState = ImmutableMap({
  accept_content_types: [],
});

export default function meta(state = initialState, action) {
  switch(action.type) {
    case STORE_HYDRATE:
      return state.merge(action.state.get("media_attachments"));
    default:
      return state;
  }
}