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
8 changes: 4 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 @@ -287,15 +287,15 @@
connectionStatus: boolean | null
onReset: () => void
}) => {
const disconnectAction = async () => {
const disableAction = async () => {
const payload = {
enable: false,
}
const url = `/api/quickbooks/token/change-enable-status?token=${token}`
try {
await postFetcher(url, {}, payload, { timeoutMs: null })
} catch (err) {
console.error('Error disconnecting QuickBooks account', err)
console.error('Error disabling QuickBooks account', err)
}
}

Expand Down Expand Up @@ -326,9 +326,9 @@
...(isConnected && isEnabled && syncFlag
? [
{
label: 'Disconnect account',
label: 'Disable sync',
icon: 'Disconnect' as Icons,
onClick: disconnectAction,
onClick: disableAction,
},
]
: []),
Expand Down
Loading