Skip to content

Commit

Permalink
fix(vscode): Add missing ReloadProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
lordrip authored and apupier committed Jul 2, 2024
1 parent 06cbd2c commit 5a8598c
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions packages/ui/src/multiplying-architecture/KaotoBridge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ import { ChannelType, EditorApi, StateControlCommand } from '@kie-tools-core/edi
import { Notification } from '@kie-tools-core/notifications/dist/api';
import { WorkspaceEdit } from '@kie-tools-core/workspace/dist/api';
import { PropsWithChildren, forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useRef } from 'react';
import { useReload } from '../hooks/reload.hook';
import { CatalogModalProvider } from '../providers/catalog-modal.provider';
import { CatalogTilesProvider } from '../providers/catalog-tiles.provider';
import { CatalogLoaderProvider } from '../providers/catalog.provider';
import { DeleteModalContextProvider } from '../providers/delete-modal.provider';
import { RuntimeProvider } from '../providers/runtime.provider';
import { SchemasLoaderProvider } from '../providers/schemas.provider';
import { SourceCodeApiContext } from '../providers/source-code.provider';
import { VisibleFlowsProvider } from '../providers/visible-flows.provider';
import { DeleteModalContextProvider } from '../providers/delete-modal.provider';
import { EventNotifier } from '../utils';
import { RuntimeProvider } from '../providers/runtime.provider';

interface KaotoBridgeProps {
/**
Expand Down Expand Up @@ -52,6 +53,7 @@ interface KaotoBridgeProps {
}

export const KaotoBridge = forwardRef<EditorApi, PropsWithChildren<KaotoBridgeProps>>((props, forwardedRef) => {
const ReloadProvider = useReload();
const eventNotifier = EventNotifier.getInstance();
const sourceCodeApiContext = useContext(SourceCodeApiContext);
const sourceCodeRef = useRef<string>('');
Expand Down Expand Up @@ -142,18 +144,20 @@ export const KaotoBridge = forwardRef<EditorApi, PropsWithChildren<KaotoBridgePr
}, [props]);

return (
<RuntimeProvider catalogUrl={props.catalogUrl}>
<SchemasLoaderProvider>
<CatalogLoaderProvider>
<CatalogTilesProvider>
<VisibleFlowsProvider>
<CatalogModalProvider>
<DeleteModalContextProvider>{props.children}</DeleteModalContextProvider>
</CatalogModalProvider>
</VisibleFlowsProvider>
</CatalogTilesProvider>
</CatalogLoaderProvider>
</SchemasLoaderProvider>
</RuntimeProvider>
<ReloadProvider>
<RuntimeProvider catalogUrl={props.catalogUrl}>
<SchemasLoaderProvider>
<CatalogLoaderProvider>
<CatalogTilesProvider>
<VisibleFlowsProvider>
<CatalogModalProvider>
<DeleteModalContextProvider>{props.children}</DeleteModalContextProvider>
</CatalogModalProvider>
</VisibleFlowsProvider>
</CatalogTilesProvider>
</CatalogLoaderProvider>
</SchemasLoaderProvider>
</RuntimeProvider>
</ReloadProvider>
);
});

0 comments on commit 5a8598c

Please sign in to comment.