diff --git a/src/bridge/header.ts b/src/bridge/header.ts index 99da2959..1107bb32 100644 --- a/src/bridge/header.ts +++ b/src/bridge/header.ts @@ -3,7 +3,13 @@ import { DASHBOARD_DOMAIN } from '@/constant/domains' import { useEffect, useMemo } from 'react' -type Icons = 'Archive' | 'Plus' | 'Templates' | 'Trash' +export type Icons = + | 'Archive' + | 'Plus' + | 'Templates' + | 'Trash' + | 'Download' + | 'Disconnected' interface BreadcrumbsPayload { items: { diff --git a/src/hook/useQuickbooks.ts b/src/hook/useQuickbooks.ts index b8662644..456a41a1 100644 --- a/src/hook/useQuickbooks.ts +++ b/src/hook/useQuickbooks.ts @@ -1,7 +1,7 @@ import { AuthStatus } from '@/app/api/core/types/auth' import { LogStatus } from '@/app/api/core/types/log' import { useApp } from '@/app/context/AppContext' -import { useActionsMenu } from '@/bridge/header' +import { Icons, useActionsMenu } from '@/bridge/header' import { copilotDashboardUrl } from '@/config' import { ConnectionStatus } from '@/db/schema/qbConnectionLogs' import { postFetcher } from '@/helper/fetch.helper' @@ -294,18 +294,21 @@ export const useAppBridge = ({ link.click() link.remove() } - let actions: { label: string; onClick: () => Promise }[] = [] + let actions: { label: string; icon?: Icons; onClick: () => Promise }[] = + [] if (connectionStatus) { actions = [ { label: 'Download sync history', + icon: 'Download', onClick: downloadCsvAction, }, ] if (isEnabled && syncFlag) { actions.push({ - label: 'Disconnect app', + label: 'Disconnect account', + icon: 'Disconnected', onClick: disconnectAction, }) }