rudimentary display of dynamic data

This commit is contained in:
2025-12-10 22:55:18 +01:00
parent 89f01c2f80
commit f05f56d42a
8 changed files with 361 additions and 118 deletions
@@ -0,0 +1,31 @@
import { Text, View } from "@react-pdf/renderer";
import { styles } from "./styles";
interface IProps {
date: Date;
lieu: string;
ronde: number;
}
const InfoTable = ({ date, lieu, ronde }: IProps) => (
<View style={styles.infoTable}>
{/* Header Row */}
<View style={styles.infoRow}>
<Text style={styles.infoCellHeader}>DATE</Text>
<Text style={styles.infoCellHeader}>LIEU</Text>
<Text style={[styles.infoCellHeader, styles.lastCell]}>RONDE</Text>
</View>
{/* Data Row */}
<View style={styles.infoRow}>
<Text style={styles.infoCell}>
{date ? new Date(date).toLocaleDateString("fr-FR") : " "}
</Text>
<Text style={styles.infoCell}>{lieu || " "}</Text>
<Text style={[styles.infoCell, styles.lastCell]}>{ronde || " "}</Text>
</View>
</View>
);
export default InfoTable;