diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index 374d637b2e..befd3274f3 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -76,7 +76,7 @@ import { hot } from 'react-hot-loader/root'; import { Navigate, Route } from 'react-router'; import { apis } from './apis'; import { entityPage } from './components/catalog/EntityPage'; -import { HomePage } from './components/home/HomePage'; +import { homePage } from './components/home/HomePage'; import { Root } from './components/Root'; import { LowerCaseValuePickerFieldExtension } from './components/scaffolder/customScaffolderExtensions'; import { searchPage } from './components/search/SearchPage'; @@ -132,7 +132,7 @@ const routes = ( {/* TODO(rubenl): Move this to / once its more mature and components exist */} }> - + {homePage} } /> ScmIntegrationsApi.fromConfig(configApi), }), - ScmAuth.createDefaultApiFactory(), - createApiFactory({ - api: gcalendarApiRef, - deps: { authApi: googleAuthApiRef, fetchApi: fetchApiRef }, - factory: deps => new GCalendarApiClient(deps), - }), + ScmAuth.createDefaultApiFactory(), createApiFactory({ api: graphQlBrowseApiRef, diff --git a/packages/app/src/components/home/HomePage.tsx b/packages/app/src/components/home/HomePage.tsx index 43d1d3e2df..6c8867ac28 100644 --- a/packages/app/src/components/home/HomePage.tsx +++ b/packages/app/src/components/home/HomePage.tsx @@ -48,7 +48,7 @@ const clockConfigs: ClockConfig[] = [ }, ]; -export const HomePage = () => ( +export const homePage = (
} pageTitleOverride="Home"> diff --git a/plugins/gcalendar/.eslintrc.js b/plugins/gcalendar/.eslintrc.js index 13573efa9c..e2a53a6ad2 100644 --- a/plugins/gcalendar/.eslintrc.js +++ b/plugins/gcalendar/.eslintrc.js @@ -1,3 +1 @@ -module.exports = { - extends: [require.resolve('@backstage/cli/config/eslint')], -}; +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/plugins/gcalendar/README.md b/plugins/gcalendar/README.md index f99bfe1e31..ccfcf9c4eb 100644 --- a/plugins/gcalendar/README.md +++ b/plugins/gcalendar/README.md @@ -4,7 +4,8 @@ Plugin displays events from google calendar ## Getting started -The plugin exports a `gcalendarApiRef`. Add this to the App's `apis.ts`: +The plugin exports `HomePageCalendar` widget for the Homepage. +If your homepage is not static JSX add `gcalendarApiRef` to the App's `apis.ts`: ```ts import { diff --git a/plugins/gcalendar/package.json b/plugins/gcalendar/package.json index f1bffbf315..faf5d5e323 100644 --- a/plugins/gcalendar/package.json +++ b/plugins/gcalendar/package.json @@ -9,6 +9,9 @@ "main": "dist/index.esm.js", "types": "dist/index.d.ts" }, + "backstage": { + "role": "frontend-plugin" + }, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", @@ -16,8 +19,7 @@ "test": "backstage-cli package test", "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack", - "diff": "backstage-cli plugin:diff" + "postpack": "backstage-cli package postpack" }, "dependencies": { "@backstage/core-components": "^0.9.1",