Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/hook/useQuickbooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
return () => {
supabase.removeChannel(realtimeSyncChannel)
}
}, [])

Check warning on line 98 in src/hook/useQuickbooks.ts

View workflow job for this annotation

GitHub Actions / Run linters

React Hook useEffect has missing dependencies: 'setAppParams' and 'tokenPayload?.workspaceId'. Either include them or remove the dependency array

// handle reconnect logic
useEffect(() => {
Expand All @@ -107,7 +107,7 @@
if (reconnect) {
handleAppConnect()
}
}, [reconnect])

Check warning on line 110 in src/hook/useQuickbooks.ts

View workflow job for this annotation

GitHub Actions / Run linters

React Hook useEffect has a missing dependency: 'handleConnect'. Either include it or remove the dependency array

const getAuthUrl = async (type?: string) => {
setLoading(true)
Expand Down Expand Up @@ -228,9 +228,11 @@
)
setLoading(false)
if (!res.ok) {
console.error({ res })
const respBody = await res.json()
const error =
respBody.error || 'handleError :: Error connecting to QuickBooks'
setError('Error connecting to QuickBooks')
return
throw new Error(error)
}
}

Expand All @@ -254,9 +256,12 @@

setLoading(false)
if (!res.ok) {
console.error({ res })
const respBody = await res.json()
const error =
respBody.error ||
'handleTokenExchange :: Error connecting to QuickBooks'
setError('Error connecting to QuickBooks')
return
throw new Error(error)
}

// auto close the current window after 2 seconds
Expand Down
Loading