Merge pull request #18337 from npiyush97/fix-18259

Fix 18259
This commit is contained in:
Fredrik Adelöw
2023-06-19 14:25:19 +02:00
committed by GitHub
4 changed files with 11 additions and 9 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-sonarqube': patch
---
fixed issued related #18259 now using luxon as adr102 asked
+1
View File
@@ -46,6 +46,7 @@
"@material-ui/lab": "4.0.0-alpha.61",
"@material-ui/styles": "^4.10.0",
"cross-fetch": "^3.1.5",
"luxon": "^3.0.0",
"rc-progress": "3.4.1",
"react-use": "^17.2.4"
},
@@ -42,6 +42,7 @@ import {
Progress,
} from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
import { DateTime } from 'luxon';
const useStyles = makeStyles(theme => ({
badgeLabel: {
@@ -272,15 +273,9 @@ export const SonarQubeCard = (props: {
</Grid>
<Grid item className={classes.lastAnalyzed}>
Last analyzed on{' '}
{new Date(value.lastAnalysis).toLocaleString('en-US', {
timeZone: 'UTC',
day: 'numeric',
month: 'short',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
hour12: false,
})}
{DateTime.fromISO(value.lastAnalysis).toLocaleString(
DateTime.DATETIME_MED,
)}
</Grid>
</Grid>
</>
+1
View File
@@ -9199,6 +9199,7 @@ __metadata:
"@types/node": ^16.11.26
"@types/react": ^16.13.1 || ^17.0.0
cross-fetch: ^3.1.5
luxon: ^3.0.0
msw: ^1.0.0
rc-progress: 3.4.1
react-use: ^17.2.4