@@ -10,15 +10,15 @@ import { API_V1_CONTEXT } from '../../../lib/graphql/helpers';
1010import { editCollectivePageMutation } from '../../../lib/graphql/v1/mutations' ;
1111import { editCollectivePageQuery } from '../../../lib/graphql/v1/queries' ;
1212import useLoggedInUser from '../../../lib/hooks/useLoggedInUser' ;
13+ import { loggedInUserQuery } from '@/lib/graphql/queries' ;
1314
1415import SettingsForm from '../../edit-collective/Form' ;
1516import Loading from '../../Loading' ;
1617import { useToast } from '../../ui/useToast' ;
1718import { ALL_SECTIONS } from '../constants' ;
18- import { adminPanelQuery } from '../queries' ;
1919
2020const AccountSettings = ( { account, section } ) => {
21- const { LoggedInUser, refetchLoggedInUser } = useLoggedInUser ( ) ;
21+ const { LoggedInUser } = useLoggedInUser ( ) ;
2222 const router = useRouter ( ) ;
2323 const [ state , setState ] = React . useState ( { status : undefined , result : undefined } ) ;
2424 const { toast } = useToast ( ) ;
@@ -108,7 +108,7 @@ const AccountSettings = ({ account, section }) => {
108108 variables : { collective : CollectiveInputType } ,
109109 // It's heavy, but we need to refetch the information of the account after a mutation as fundamental
110110 // properties like its name or whether it's a fiscal host can change.
111- refetchQueries : [ { query : adminPanelQuery , variables : { slug : account . slug } } ] ,
111+ refetchQueries : [ { query : loggedInUserQuery } ] ,
112112 } ) ;
113113 const updatedCollective = response . data . editCollective ;
114114 setState ( { ...state , status : 'saved' , result : { error : null } } ) ;
@@ -120,7 +120,7 @@ const AccountSettings = ({ account, section }) => {
120120 ...router . query ,
121121 } ,
122122 } ) ;
123- await refetchLoggedInUser ( ) ;
123+ // await refetchLoggedInUser();
124124 } else {
125125 setTimeout ( ( ) => {
126126 setState ( { ...state , status : null } ) ;
0 commit comments