Skip to content

Commit

Permalink
chore(frontend): update TypeScript to version 5.7.3
Browse files Browse the repository at this point in the history
- Updated TypeScript version from `^4.4.x` to `^5.7.3` in `package.json` and `package-lock.json`.
- Removed unused import of `React` in `Common.tsx` and `SectionHeader.tsx`.
- Fixed type coercion issue in `InstanceCountLabel` component by converting `countText` to a number.
- Ensured `aria-label` in `SectionHeader` uses `toString()` for translation.
  • Loading branch information
ErvinRacz committed Feb 26, 2025
1 parent acac634 commit 5ef77d4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion frontend/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config: StorybookConfig = {
docs: {},

typescript: {
reactDocgen: 'react-docgen-typescript'
reactDocgen: 'react-docgen-typescript',
}
};

Expand Down
38 changes: 19 additions & 19 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"pg": "^8.13.1",
"prettier": "^2.3.2",
"storybook": "^8.5.8",
"typescript": "^4.4.x"
"typescript": "^5.7.3"
},
"scripts": {
"build-icons": "node tools/build-icons.js ./src/img ./src/icons && npm run format",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/Instances/Common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box, Link, Theme } from '@mui/material';
import Grid from '@mui/material/Grid';
import Typography from '@mui/material/Typography';
import { makeStyles } from '@mui/styles';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Link as RouterLink } from 'react-router-dom';

Expand Down Expand Up @@ -43,7 +42,7 @@ export function InstanceCountLabel(props: {
<Typography className={classes.instancesCount}>{countText}</Typography>
</Grid>
<Grid item>
{!instanceListView && countText > 0 ? (
{!instanceListView && Number(countText) > 0 ? (
<Box>
{!props.loading && (
<Link to={{ ...href }} component={RouterLink} underline="hover">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Grid from '@mui/material/Grid';
import Link from '@mui/material/Link';
import Typography from '@mui/material/Typography';
import makeStyles from '@mui/styles/makeStyles';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Link as RouterLink } from 'react-router-dom';
import PageTitle from '../PageTitle/PageTitle';
Expand Down Expand Up @@ -49,7 +48,7 @@ export default function SectionHeader(props: SectionHeaderProps) {
>
<Grid item>
<Breadcrumbs
aria-label={t('common|breadcrumbs')}
aria-label={t('common|breadcrumbs').toString()}
separator={<NavigateNextIcon fontSize="small" />}
>
{breadcrumbs &&
Expand Down

0 comments on commit 5ef77d4

Please # to comment.