fix: remove object-hash dependency from home plugin
The object hash doesn't work if the component props include React components such as icons. This is true for example the HomepageToolkit component. Removed the hashing of the component props completely as the hash is totally optional to be used as a key in the CustomHomepageGrid. Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
@@ -21,12 +21,15 @@ import {
|
||||
ClockConfig,
|
||||
HomePageStarredEntities,
|
||||
CustomHomepageGrid,
|
||||
HomePageToolkit,
|
||||
HomePageCompanyLogo,
|
||||
} from '@backstage/plugin-home';
|
||||
import { Content, Header, Page } from '@backstage/core-components';
|
||||
import { HomePageSearchBar } from '@backstage/plugin-search';
|
||||
import { HomePageCalendar } from '@backstage/plugin-gcalendar';
|
||||
import { MicrosoftCalendarCard } from '@backstage/plugin-microsoft-calendar';
|
||||
import React from 'react';
|
||||
import HomeIcon from '@material-ui/icons/Home';
|
||||
|
||||
const clockConfigs: ClockConfig[] = [
|
||||
{
|
||||
@@ -55,12 +58,26 @@ const timeFormat: Intl.DateTimeFormatOptions = {
|
||||
|
||||
const defaultConfig = [
|
||||
{
|
||||
component: 'HomePageSearchBar',
|
||||
component: 'CompanyLogo',
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 12,
|
||||
height: 1,
|
||||
},
|
||||
{
|
||||
component: 'WelcomeTitle',
|
||||
x: 0,
|
||||
y: 1,
|
||||
width: 12,
|
||||
height: 1,
|
||||
},
|
||||
{
|
||||
component: 'HomePageSearchBar',
|
||||
x: 0,
|
||||
y: 2,
|
||||
width: 12,
|
||||
height: 1,
|
||||
},
|
||||
];
|
||||
|
||||
export const homePage = (
|
||||
@@ -78,6 +95,17 @@ export const homePage = (
|
||||
<HomePageCalendar />
|
||||
<MicrosoftCalendarCard />
|
||||
<HomePageStarredEntities />
|
||||
<HomePageCompanyLogo />
|
||||
<WelcomeTitle />
|
||||
<HomePageToolkit
|
||||
tools={[
|
||||
{
|
||||
url: 'https://backstage.io',
|
||||
label: 'Backstage Homepage',
|
||||
icon: <HomeIcon />,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</CustomHomepageGrid>
|
||||
</Content>
|
||||
</Page>
|
||||
|
||||
Reference in New Issue
Block a user