+ componentDidMount() {
+ // fetch custom views
+ this.props.onFetchCustomViews();
+
+ // fetch custom components
+ let components = getConfiguredComponentList(customComponentConfig);
+ this.props.onConfigurableViewsInitialLoad(components);
+ }
+
+ componentDidUpdate(prevProps) {
+ if ((Object.keys(this.props.customComponents).length > 0 &&
+ Object.keys(this.props.configurableViewsConfig).length > 0) &&
+ ((JSON.stringify(prevProps.configurableViewsConfig) !== JSON.stringify(this.props.configurableViewsConfig)) ||
+ (JSON.stringify(prevProps.customComponents) !== JSON.stringify(this.props.customComponents)))) {
+ // we have both config and components populated and one was just set
+ let customRoutes = getConfigurableRoutes(this.props.configurableViewsConfig, this.props.customComponents);
+ this.props.onSetCustomRoutes(customRoutes);
+ }
+ }