1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-23 01:16:27 +02:00
unleash.unleash/frontend/src/store/loader.js
Ivar Conradi Østhus 5342c86b60 fix: one and only one front (#244)
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-02-24 11:03:18 +01:00

19 lines
694 B
JavaScript

import { fetchUIConfig } from './ui-config/actions';
import { fetchContext } from './context/actions';
import { fetchFeatureTypes } from './feature-type/actions';
import { fetchProjects } from './project/actions';
import { fetchStrategies } from './strategy/actions';
import { fetchTagTypes } from './tag-type/actions';
import { C, P } from '../component/common/flags';
export function loadInitialData(flags = {}) {
return dispatch => {
fetchUIConfig()(dispatch);
if (flags[C]) fetchContext()(dispatch);
fetchFeatureTypes()(dispatch);
if (flags[P]) fetchProjects()(dispatch);
fetchStrategies()(dispatch);
fetchTagTypes()(dispatch);
};
}