mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 12:36:57 +00:00
rudimentary display of dynamic data
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user