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,13 @@ 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
2221 [ release . os , release . version ]
2322 ) ;
2423
@@ -36,7 +35,6 @@ const InstallationMethodDropdown: FC = () => {
3635 } ,
3736 ] ,
3837 // We only want to react on the change of the parsedPlatforms
39- // eslint-disable-next-line react-hooks/exhaustive-deps
4038 [ parsedInstallMethods ]
4139 ) ;
4240
@@ -55,7 +53,6 @@ const InstallationMethodDropdown: FC = () => {
5553 // when the OS has finished loading for a given installation method
5654 release . setInstallMethod ( installationMethod as InstallationMethod ) ;
5755 }
58- // eslint-disable-next-line react-hooks/exhaustive-deps
5956 } , [ parsedInstallMethods , release . installMethod , release . os ] ) ;
6057
6158 // We set the Platform to the next available platform when the current
@@ -69,7 +66,6 @@ const InstallationMethodDropdown: FC = () => {
6966 }
7067 } ,
7168 // We only want to react on the change of the OS and Version
72- // eslint-disable-next-line react-hooks/exhaustive-deps
7369 [ release . os , release . version ]
7470 ) ;
7571
0 commit comments