diff options
author | Eric Bailey <git@esb.lol> | 2023-11-10 08:46:45 -0600 |
---|---|---|
committer | Eric Bailey <git@esb.lol> | 2023-11-10 08:46:45 -0600 |
commit | b0c9cce5c3ea9246fbc2f71ac64c10c5252ec9a4 (patch) | |
tree | 510b14357ceff341a79c8947b9ea9b7e1fe4464d /src/view/com/modals/SwitchAccount.tsx | |
parent | 742f53d1ecfc5060b7e6fc0cea0f8729d2e9b1b5 (diff) | |
download | voidsky-b0c9cce5c3ea9246fbc2f71ac64c10c5252ec9a4.tar.zst |
Follow conventions for query, use isDirty flag in session store to avoid unneccessary writes
Diffstat (limited to 'src/view/com/modals/SwitchAccount.tsx')
-rw-r--r-- | src/view/com/modals/SwitchAccount.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/view/com/modals/SwitchAccount.tsx b/src/view/com/modals/SwitchAccount.tsx index 2ff70eea4..55ba69365 100644 --- a/src/view/com/modals/SwitchAccount.tsx +++ b/src/view/com/modals/SwitchAccount.tsx @@ -19,7 +19,7 @@ import {Haptics} from 'lib/haptics' import {Trans, msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useSession, useSessionApi, SessionAccount} from '#/state/session' -import {useGetProfile} from '#/data/useGetProfile' +import {useProfileQuery} from '#/state/queries/profile' export const snapPoints = ['40%', '90%'] @@ -29,7 +29,7 @@ function SwitchAccountCard({account}: {account: SessionAccount}) { const {track} = useAnalytics() const {isSwitchingAccounts, currentAccount} = useSession() const {logout} = useSessionApi() - const {isError, data: profile} = useGetProfile({did: account.did}) + const {isError, data: profile} = useProfileQuery({did: account.did}) const isCurrentAccount = account.did === currentAccount?.did const {onPressSwitchAccount} = useAccountSwitcher() |