Skip to content

Commit

Permalink
fix: forget to add useAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed May 8, 2024
1 parent 89b1c35 commit 6b24977
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/mask/popups/components/PopupLayout/LoadMaskSDK.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Box, Link } from '@mui/material'
import { useState } from 'react'
import { ErrorBoundary } from '@masknet/shared-base-ui'
import { useQuery } from '@tanstack/react-query'
import { useAsync } from 'react-use'

export default function MaskSDK() {
if (!Flags.mask_sdk_enabled) return null
Expand All @@ -20,7 +21,7 @@ function MaskSDKLoader() {
queryKey: ['shouldSuggestConnectInPopup()'],
})
const [dismissed, setDismissed] = useState(false)
const [{ result: currentTab }] = useAsync(async () => {
const { value: currentTab } = useAsync(async () => {
const tab = await Services.Helper.getActiveTab()
return tab?.url ? new URL(tab.url).origin + '/*' : null
})
Expand Down

0 comments on commit 6b24977

Please sign in to comment.