@@ -5,23 +5,23 @@ import {
55 Square3Stack3DIcon ,
66} from '@heroicons/react/24/outline' ;
77import { useTranslations } from 'next-intl' ;
8- import type { FC , ReactNode } from 'react' ;
8+ import type { FC , ReactNode , SVGProps } from 'react' ;
99
1010import FormattedTime from '@/components/Common/FormattedTime' ;
1111import type { NodeRelease } from '@/types' ;
1212
1313import styles from './index.module.css' ;
1414
1515type ItemProps = {
16- icon : React . JSX . Element ;
16+ Icon : FC < SVGProps < SVGSVGElement > > ;
1717 title : ReactNode ;
1818 subtitle : ReactNode ;
1919} ;
2020
21- const Item : FC < ItemProps > = ( { icon , title, subtitle } ) => {
21+ const Item : FC < ItemProps > = ( { Icon , title, subtitle } ) => {
2222 return (
2323 < div className = { styles . item } >
24- { icon }
24+ < Icon />
2525 < div >
2626 < h2 > { subtitle } </ h2 >
2727 < h1 > { title } </ h1 >
@@ -41,36 +41,36 @@ export const ReleaseOverview: FC<ReleaseOverviewProps> = ({ release }) => {
4141 < div className = { styles . root } >
4242 < div className = { styles . container } >
4343 < Item
44- icon = { < CalendarIcon /> }
44+ Icon = { CalendarIcon }
4545 title = { < FormattedTime date = { release . currentStart } /> }
4646 subtitle = { t ( 'components.releaseOverview.firstReleased' ) }
4747 />
4848 < Item
49- icon = { < ClockIcon /> }
49+ Icon = { ClockIcon }
5050 title = { < FormattedTime date = { release . releaseDate } /> }
5151 subtitle = { t ( 'components.releaseOverview.lastUpdated' ) }
5252 />
5353 < Item
54- icon = { < Square3Stack3DIcon /> }
54+ Icon = { Square3Stack3DIcon }
5555 title = { release . minorVersions . length }
5656 subtitle = { t ( 'components.releaseOverview.minorVersions' ) }
5757 />
5858 { release . modules && (
5959 < Item
60- icon = { < CodeBracketSquareIcon /> }
60+ Icon = { CodeBracketSquareIcon }
6161 title = { `v${ release . modules } ` }
6262 subtitle = { t ( 'components.releaseOverview.nApiVersion' ) }
6363 />
6464 ) }
6565 { release . npm && (
6666 < Item
67- icon = { < CodeBracketSquareIcon /> }
67+ Icon = { CodeBracketSquareIcon }
6868 title = { `v${ release . npm } ` }
6969 subtitle = { t ( 'components.releaseOverview.npmVersion' ) }
7070 />
7171 ) }
7272 < Item
73- icon = { < CodeBracketSquareIcon /> }
73+ Icon = { CodeBracketSquareIcon }
7474 title = { `v${ release . v8 } ` }
7575 subtitle = { t ( 'components.releaseOverview.v8Version' ) }
7676 />
0 commit comments