about summary refs log tree commit diff
path: root/src/screens/Deactivated.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-05-28 16:37:51 +0100
committerGitHub <noreply@github.com>2024-05-28 16:37:51 +0100
commit9bd411c15159609803c4e8c3e352a9db32ea527c (patch)
tree31305e290bd4597aa6ab441ecc556999b19ad693 /src/screens/Deactivated.tsx
parent8a2f43c218c464e6165f331e482b6094b87eefc7 (diff)
downloadvoidsky-9bd411c15159609803c4e8c3e352a9db32ea527c.tar.zst
Replace getAgent() with reading agent (#4243)
* Replace getAgent() with agent

* Replace {agent} with agent
Diffstat (limited to 'src/screens/Deactivated.tsx')
-rw-r--r--src/screens/Deactivated.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/screens/Deactivated.tsx b/src/screens/Deactivated.tsx
index 08a2232df..c9e9f9525 100644
--- a/src/screens/Deactivated.tsx
+++ b/src/screens/Deactivated.tsx
@@ -24,7 +24,7 @@ export function Deactivated() {
   const {gtMobile} = useBreakpoints()
   const onboardingDispatch = useOnboardingDispatch()
   const {logout} = useSessionApi()
-  const {getAgent} = useAgent()
+  const agent = useAgent()
 
   const [isProcessing, setProcessing] = React.useState(false)
   const [estimatedTime, setEstimatedTime] = React.useState<string | undefined>(
@@ -37,11 +37,11 @@ export function Deactivated() {
   const checkStatus = React.useCallback(async () => {
     setProcessing(true)
     try {
-      const res = await getAgent().com.atproto.temp.checkSignupQueue()
+      const res = await agent.com.atproto.temp.checkSignupQueue()
       if (res.data.activated) {
         // ready to go, exchange the access token for a usable one and kick off onboarding
-        await getAgent().refreshSession()
-        if (!isSessionDeactivated(getAgent().session?.accessJwt)) {
+        await agent.refreshSession()
+        if (!isSessionDeactivated(agent.session?.accessJwt)) {
           onboardingDispatch({type: 'start'})
         }
       } else {
@@ -61,7 +61,7 @@ export function Deactivated() {
     setEstimatedTime,
     setPlaceInQueue,
     onboardingDispatch,
-    getAgent,
+    agent,
   ])
 
   React.useEffect(() => {