about summary refs log tree commit diff
path: root/src/view/screens/Settings/ExportCarDialog.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/view/screens/Settings/ExportCarDialog.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/view/screens/Settings/ExportCarDialog.tsx')
-rw-r--r--src/view/screens/Settings/ExportCarDialog.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/view/screens/Settings/ExportCarDialog.tsx b/src/view/screens/Settings/ExportCarDialog.tsx
index af835cb62..72d943bcf 100644
--- a/src/view/screens/Settings/ExportCarDialog.tsx
+++ b/src/view/screens/Settings/ExportCarDialog.tsx
@@ -21,11 +21,10 @@ export function ExportCarDialog({
 }) {
   const {_} = useLingui()
   const t = useTheme()
-  const {getAgent} = useAgent()
+  const agent = useAgent()
   const [loading, setLoading] = React.useState(false)
 
   const download = React.useCallback(async () => {
-    const agent = getAgent()
     if (!agent.session) {
       return // shouldnt ever happen
     }
@@ -49,7 +48,7 @@ export function ExportCarDialog({
       setLoading(false)
       control.close()
     }
-  }, [_, control, getAgent])
+  }, [_, control, agent])
 
   return (
     <Dialog.Outer control={control}>