From a98637c1533c8545d75b17c22849b1eef522c996 Mon Sep 17 00:00:00 2001 From: Rob Long Date: Tue, 16 Feb 2021 16:55:51 +0000 Subject: [PATCH 1/2] Update Percentage.tsx useTheme() on line 32 returns null so I tested this change to the import on my local copy, which gets the sonar plugin working. Other plugins seem to be importing from '@material-ui/core', e.g. https://github.com/backstage/backstage/blob/7ee15d2c5b40a8984aacabe7bdf5ccab759d95a6/plugins/catalog/src/components/CatalogFilter/AllServicesCount.tsx#L19 --- plugins/sonarqube/src/components/SonarQubeCard/Percentage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sonarqube/src/components/SonarQubeCard/Percentage.tsx b/plugins/sonarqube/src/components/SonarQubeCard/Percentage.tsx index 9d1fc415ff..838e3d6609 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/Percentage.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/Percentage.tsx @@ -16,7 +16,7 @@ import { BackstageTheme } from '@backstage/theme'; import { makeStyles } from '@material-ui/core/styles'; -import { useTheme } from '@material-ui/styles'; +import { useTheme } from '@material-ui/core'; import { Circle } from 'rc-progress'; import React from 'react'; From 3a82293dadf363efe063941b0797c004d7e8604c Mon Sep 17 00:00:00 2001 From: bobalong79 Date: Tue, 16 Feb 2021 22:19:22 +0000 Subject: [PATCH 2/2] Add changeset --- .changeset/blue-lions-worry.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/blue-lions-worry.md diff --git a/.changeset/blue-lions-worry.md b/.changeset/blue-lions-worry.md new file mode 100644 index 0000000000..911e1507b2 --- /dev/null +++ b/.changeset/blue-lions-worry.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-sonarqube': patch +--- + +Fix bug retrieving current theme