Phase2: Invoicecomputation/AdminpricingUI/Ainvoicemgnt
Some checks failed
Build and Push / build (push) Failing after 53s
Some checks failed
Build and Push / build (push) Failing after 53s
This commit is contained in:
@@ -611,21 +611,25 @@ const InvoicePdf: React.FC<InvoicePdfProps> = ({ invoice, lines }) => {
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{/* Footer with page numbers — react-pdf supplies render fn args */}
|
||||
<View
|
||||
style={styles.footer}
|
||||
render={({ pageNumber, totalPages }) => (
|
||||
<>
|
||||
<Text>
|
||||
{BRAND.issuer.legalName} · {BRAND.issuer.web} · {BRAND.issuer.email}
|
||||
</Text>
|
||||
<Text>
|
||||
{s.page} {pageNumber} {s.of} {totalPages}
|
||||
</Text>
|
||||
</>
|
||||
)}
|
||||
fixed
|
||||
/>
|
||||
{/* Footer with page numbers.
|
||||
react-pdf API quirks (verified against build errors):
|
||||
- The `render` callback on <View> only exposes
|
||||
`{ pageNumber, subPageNumber }` — no totalPages.
|
||||
Only <Text> gets `{ pageNumber, totalPages,
|
||||
subPageNumber, subPageTotalPages }`.
|
||||
- <Text>'s render callback must return a STRING
|
||||
(or array of strings), not JSX. */}
|
||||
<View style={styles.footer} fixed>
|
||||
<Text>
|
||||
{BRAND.issuer.legalName} · {BRAND.issuer.web} · {BRAND.issuer.email}
|
||||
</Text>
|
||||
<Text
|
||||
render={({ pageNumber, totalPages }) =>
|
||||
`${s.page} ${pageNumber} ${s.of} ${totalPages}`
|
||||
}
|
||||
fixed
|
||||
/>
|
||||
</View>
|
||||
</Page>
|
||||
</Document>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user