@@ -6,7 +6,7 @@ import { useQueryUserPurchases } from 'calypso/components/data/query-user-purcha
6
6
import { PanelCardHeading } from 'calypso/components/panel' ;
7
7
import { ResponseDomain } from 'calypso/lib/domains/types' ;
8
8
import { getSettingsSource } from 'calypso/my-sites/site-settings/site-tools/utils' ;
9
- import { isSiteSettingsUntangled } from 'calypso/sites/settings/utils ' ;
9
+ import { useIsSiteSettingsUntangled } from 'calypso/sites/settings/hooks/use-is-site-settings-untangled ' ;
10
10
import { useDispatch , useSelector } from 'calypso/state' ;
11
11
import { recordTracksEvent } from 'calypso/state/analytics/actions' ;
12
12
import { getCurrentUserEmail } from 'calypso/state/current-user/selectors' ;
@@ -26,12 +26,13 @@ const Strong = styled( 'strong' )( {
26
26
27
27
const SiteTransferComplete = ( ) => {
28
28
const translate = useTranslate ( ) ;
29
+ const isUntangled = useIsSiteSettingsUntangled ( ) ;
30
+
29
31
const userEmail = useSelector ( getCurrentUserEmail ) ;
30
32
if ( ! userEmail ) {
31
33
return null ;
32
34
}
33
35
34
- const isUntangled = isSiteSettingsUntangled ( ) ;
35
36
const message = (
36
37
< p >
37
38
{ translate (
@@ -70,6 +71,7 @@ const SiteOwnerTransfer = () => {
70
71
const pendingDomain = nonWpcomDomains ?. find (
71
72
( wpcomDomain : ResponseDomain ) => wpcomDomain . pendingTransfer
72
73
) ;
74
+ const isSiteSettingsUntangled = useIsSiteSettingsUntangled ( ) ;
73
75
74
76
useEffect ( ( ) => {
75
77
dispatch ( recordTracksEvent ( 'calypso_site_owner_transfer_page_view' ) ) ;
@@ -83,7 +85,7 @@ const SiteOwnerTransfer = () => {
83
85
if ( ! pendingDomain && newSiteOwner && ! transferSiteSuccess ) {
84
86
setNewSiteOwner ( null ) ;
85
87
} else {
86
- const source = isSiteSettingsUntangled ( ) ? '/sites/settings/site' : getSettingsSource ( ) ;
88
+ const source = isSiteSettingsUntangled ? '/sites/settings/site' : getSettingsSource ( ) ;
87
89
page ( `${ source } /${ selectedSite . slug } ` ) ;
88
90
}
89
91
} ;
0 commit comments