fix-18259

Signed-off-by: npiyush97 <npiyush35@gmail.com>
This commit is contained in:
npiyush97
2023-06-19 16:46:47 +05:30
parent 0e03457c2d
commit 02ede704fe
2 changed files with 6 additions and 10 deletions
+2 -1
View File
@@ -47,7 +47,8 @@
"@material-ui/styles": "^4.10.0",
"cross-fetch": "^3.1.5",
"rc-progress": "3.4.1",
"react-use": "^17.2.4"
"react-use": "^17.2.4",
"luxon": "^3.3.0"
},
"peerDependencies": {
"react": "^16.13.1 || ^17.0.0",
@@ -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>
</>