Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
keellyp committed Feb 5, 2025
1 parent 5c09286 commit a1b8315
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { deserializeAmount } from '~/core/serializers/serializeAmount'
import { LocaleEnum } from '~/core/translations'
import {
CurrencyEnum,
InvoicesForDunningEmailFragment,
useGetOrganizationInfoForPreviewDunningCampaignLazyQuery,
} from '~/generated/graphql'
import { useContextualLocale } from '~/hooks/core/useContextualLocale'
Expand Down Expand Up @@ -45,10 +46,12 @@ export const PreviewCampaignEmailDrawer = forwardRef<PreviewCampaignEmailDrawerR
const [getOrganizationInfo, { loading, data }] =
useGetOrganizationInfoForPreviewDunningCampaignLazyQuery()

const invoices = Array.from({ length: DUMMY_INVOICES_COUNT }).map((_, index) => ({
const invoices: InvoicesForDunningEmailFragment[] = Array.from({
length: DUMMY_INVOICES_COUNT,
}).map((_, index) => ({
id: `${index}`,
number: `${data?.organization?.name.slice(0, 3).toUpperCase()}-1234-567-89${index + 1}`,
totalAmountCents:
totalDueAmountCents:
index === 0 ? DUMMY_OVERDUE_AMOUNT_CENTS - 10000 * (DUMMY_INVOICES_COUNT - 1) : 10000,
currency: CurrencyEnum.Usd,
}))
Expand Down
2 changes: 1 addition & 1 deletion src/pages/PaymentDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const PaymentDetails = () => {
const payable = payment?.payable
const payableInvoice = payable?.__typename === 'Invoice' && [payable]
const requestPaymentInvoices = payable?.__typename === 'PaymentRequest' && payable?.invoices
const invoices = payableInvoice || requestPaymentInvoices
const invoices = payableInvoice || requestPaymentInvoices || []

const goToPreviousRoute = useCallback(
() =>
Expand Down

0 comments on commit a1b8315

Please sign in to comment.