/* * Copyright 2020-2021 AskChristee, LLC. All rights reserved. */ import { Document, Page, StyleSheet, Text, View, Image } from '@react-pdf/renderer'; import React from 'react'; import { TSellerNetNotes, TSellerNetResponse } from '../../../../types/api'; import ReportHeader from '../../../atoms/Pdf/ReportHeader'; import ReportTitle from '../../../atoms/Pdf/ReportTitle'; import UserInfo from '../../../atoms/Pdf/UserInfo'; import logo from '../../../../images/christee-logo.png'; const styles = StyleSheet.create({ body: { paddingTop: 10, paddingBottom: 25, paddingHorizontal: 30, }, pageNumber: { position: 'absolute', fontSize: 9, bottom: 15, left: 0, right: 0, textAlign: 'center', color: 'black', }, image: { width: 70, height: 20, }, header: { fontSize: 12, marginBottom: 20, textAlign: 'center', color: 'grey', }, description: { textAlign: 'left', width: '50%', fontSize: 9, }, tableContainer: { flexDirection: 'row', flexWrap: 'wrap', marginTop: 15, }, row: { flexDirection: 'row', height: 16, }, acalc: { width: '30%', fontSize: 9, textAlign: 'left', }, note: { width: '100%', textAlign: 'left', fontSize: 9, }, logo: { width: 65, height: 15, position: 'absolute', bottom: 11, left: 65, }, copy: { fontSize: 9, position: 'absolute', bottom: 13, left: 10, }, }); interface RProps { aNotes: TSellerNetNotes; } const ReportDetails: React.FC = ({ aNotes }) => { return ( {aNotes.pdfmess1} {aNotes.pdfmess2} {aNotes.pdfmess2a} {aNotes.pdfmess3} {aNotes.pdfmess4} {aNotes.pdfmess5} {aNotes.pdfmess6} {aNotes.pdfmess7} {aNotes.pdfmess8} {aNotes.pdfmess9} {aNotes.pdfmess10} {aNotes.pdfmess11} {aNotes.pdfmess12} {aNotes.pdfmess13} {aNotes.pdfmess14} {aNotes.pdfmess15} {aNotes.pdfmess16} {aNotes.pdfmess17} {aNotes.pdfmess18} {aNotes.pdfmess19} {aNotes.pdfmess20} {aNotes.pdfmess21} {aNotes.pdfmess22} {aNotes.pdfmess23} {aNotes.pdfmess24} {aNotes.pdfmess25} {aNotes.pdfmess26} {aNotes.pdfmess27} {aNotes.pdfmess28} {aNotes.pdfmess29} {aNotes.pdfmess30} {aNotes.pdfmess31} {aNotes.pdfmess32} {aNotes.pdfmess33} {aNotes.pdfmess34} {aNotes.pdfmess35} {aNotes.pdfmess36} {aNotes.pdfmess37} {aNotes.pdfmess38} {aNotes.pdfmess39} {aNotes.pdfmess40} {aNotes.pdfmess41} {aNotes.pdfmess42} ); }; interface Props { dat: TSellerNetResponse & { title: string }; } const PdfReportContainer: React.FC = ({ dat: { results, title, coverPage } }) => { console.log(coverPage); return ( {!!(coverPage.name && coverPage.email) && } Powered By `${pageNumber} / ${totalPages}`} fixed /> ); }; export default PdfReportContainer;