Provide implementation of the api in the app instead

Signed-off-by: Marcus Eide <eide@spotify.com>
This commit is contained in:
Marcus Eide
2021-04-22 10:33:40 +02:00
parent 15067b0566
commit f8eb7cacc7
2 changed files with 15 additions and 18 deletions
+1 -18
View File
@@ -14,27 +14,10 @@
* limitations under the License.
*/
import {
createApiFactory,
createComponentExtension,
createPlugin,
errorApiRef,
WebStorage,
} from '@backstage/core';
import { shortcutsApiRef, LocalStoredShortcuts } from './api';
import { createComponentExtension, createPlugin } from '@backstage/core';
export const shortcutsPlugin = createPlugin({
id: 'shortcuts',
apis: [
createApiFactory({
api: shortcutsApiRef,
deps: { errorApi: errorApiRef },
factory: ({ errorApi }) =>
new LocalStoredShortcuts(
WebStorage.create({ namespace: '@backstage/shortcuts', errorApi }),
),
}),
],
});
export const Shortcuts = shortcutsPlugin.provide(