File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ import {
1313 SelectableOptionMenuItemType ,
1414 Icon
1515} from '@fluentui/react' ;
16-
17- import { Async } from '@uifabric/utilities/lib/Async' ;
16+ import { useAsync } from '@fluentui/react-hooks' ;
1817
1918import * as telemetry from '../../common/telemetry' ;
2019import { toRelativeUrl } from '../../common/utilities/GeneralHelper' ;
@@ -67,12 +66,6 @@ const styles = mergeStyleSets({
6766 } ,
6867} ) ;
6968
70- useEffect ( ( ) => {
71- return ( ) => {
72- async . dispose ( ) ;
73- } ;
74- } , [ ] ) ;
75-
7669export const SitePicker : React . FunctionComponent < ISitePickerProps > = (
7770 props : React . PropsWithChildren < ISitePickerProps >
7871) => {
@@ -103,6 +96,7 @@ export const SitePicker: React.FunctionComponent<ISitePickerProps> = (
10396 const [ allSites , setAllSites ] = React . useState < ISite [ ] > ( ) ;
10497 const [ filteredSites , setFilteredSites ] = React . useState < ISite [ ] > ( ) ;
10598 const [ searchQuery , setSearchQuery ] = React . useState < string > ( ) ;
99+ const async = useAsync ( ) ;
106100
107101 const onSearchChange = React . useCallback (
108102 ( e , newSearchQuery : string ) => {
You can’t perform that action at this time.
0 commit comments