Incorporated the feedback

Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2022-06-02 16:18:56 +02:00
parent 2705ba958e
commit 720de25f58
4 changed files with 7 additions and 11 deletions
@@ -236,14 +236,11 @@ export function createReactExtension<
| { id?: string }
| undefined;
const renderComponent = () =>
plugin.getPluginOptions() ? (
<PluginOptionsProvider pluginOptions={plugin.getPluginOptions()}>
<Component {...props} />
</PluginOptionsProvider>
) : (
const renderComponent = () => (
<PluginOptionsProvider pluginOptions={plugin.getPluginOptions()}>
<Component {...props} />
);
</PluginOptionsProvider>
);
return (
<Suspense fallback={<Progress />}>
@@ -22,7 +22,7 @@ import {
import { AnyPluginOptions } from '../plugin';
import React, { ReactNode } from 'react';
const contextKey: string = 'pluginOptions-context';
const contextKey: string = 'plugin-options-context';
/**
* Properties for the AsyncEntityProvider component.
+1 -1
View File
@@ -49,7 +49,7 @@ export type AnyExternalRoutes = { [name: string]: ExternalRouteRef };
*
* @public
*/
export type AnyPluginOptions = { [name: string]: any };
export type AnyPluginOptions = { [name: string]: unknown };
export type ReconfigureFunction = (
options: AnyPluginOptions,
+1 -2
View File
@@ -9,7 +9,6 @@
"compilerOptions": {
"outDir": "dist-types",
"rootDir": ".",
"useUnknownInCatchVariables": false,
"jsx": "react"
"useUnknownInCatchVariables": false
}
}