about summary refs log tree commit diff
path: root/src/screens/Deactivated.tsx
diff options
context:
space:
mode:
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(() => {