22
33import Select from '@node-core/ui-components/Common/Select' ;
44import { useTranslations } from 'next-intl' ;
5- import { useContext , useEffect , useMemo } from 'react' ;
5+ import { use , useEffect , useMemo } from 'react' ;
66
77import { ReleaseContext } from '#site/providers/releaseProvider' ;
88import { nextItem , INSTALL_METHODS , parseCompat } from '#site/util/download' ;
@@ -11,14 +11,14 @@ import type { InstallationMethod } from '#site/types/release';
1111import type { FC } from 'react' ;
1212
1313const InstallationMethodDropdown : FC = ( ) => {
14- const release = useContext ( ReleaseContext ) ;
14+ const release = use ( ReleaseContext ) ;
1515 const t = useTranslations ( ) ;
1616
1717 // We parse the compatibility of the dropdown items
1818 const parsedInstallMethods = useMemo (
1919 ( ) => parseCompat ( INSTALL_METHODS , release ) ,
2020 // We only want to react on the change of the OS and Version
21- // eslint-disable-next-line react-hooks /exhaustive-deps
21+ // eslint-disable-next-line @eslint-react /exhaustive-deps
2222 [ release . os , release . version ]
2323 ) ;
2424
@@ -36,7 +36,7 @@ const InstallationMethodDropdown: FC = () => {
3636 } ,
3737 ] ,
3838 // We only want to react on the change of the parsedPlatforms
39- // eslint-disable-next-line react-hooks /exhaustive-deps
39+ // eslint-disable-next-line @eslint-react /exhaustive-deps
4040 [ parsedInstallMethods ]
4141 ) ;
4242
@@ -55,7 +55,7 @@ const InstallationMethodDropdown: FC = () => {
5555 // when the OS has finished loading for a given installation method
5656 release . setInstallMethod ( installationMethod as InstallationMethod ) ;
5757 }
58- // eslint-disable-next-line react-hooks /exhaustive-deps
58+ // eslint-disable-next-line @eslint-react /exhaustive-deps
5959 } , [ parsedInstallMethods , release . installMethod , release . os ] ) ;
6060
6161 // We set the Platform to the next available platform when the current
@@ -69,7 +69,7 @@ const InstallationMethodDropdown: FC = () => {
6969 }
7070 } ,
7171 // We only want to react on the change of the OS and Version
72- // eslint-disable-next-line react-hooks /exhaustive-deps
72+ // eslint-disable-next-line @eslint-react /exhaustive-deps
7373 [ release . os , release . version ]
7474 ) ;
7575
0 commit comments