mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-23 01:16:27 +02:00
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai> Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
19 lines
694 B
JavaScript
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);
|
|
};
|
|
}
|