/* * Copyright 2020-2021 AskChristee, LLC. All rights reserved. */ import { StyleSheet, View, Text } from "@react-pdf/renderer"; import React from "react"; import { PdfCash } from "../../../atoms"; import { TAmortizationHeader } from "../../../../types/api"; const styles = StyleSheet.create({ row: { flexDirection: "row", height: 16, }, acalc: { width: "12%", fontSize: 9, textAlign: "left", }, }); interface Props { header: TAmortizationHeader; } const SummaryDetails: React.FC = ({ header }) => { console.log("pdfrowheader->", header); const txtHeader = Object.fromEntries(Object.entries(header).slice(2)); const mad = Object.values(txtHeader); console.log("pdfrowheader->mad->", mad); let count = 0; const rows = mad.map((item) => { return ( {item[1]} {item[3]} {item[4]} ); }); return {rows}; }; export default SummaryDetails;