mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
34 lines
919 B
TypeScript
34 lines
919 B
TypeScript
import { Text, View } from "@react-pdf/renderer";
|
|
|
|
import { longDateLocaleString } from "@/utils/formatDate";
|
|
|
|
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 ? longDateLocaleString({ date, locale: "fr-FR" }) : ""}
|
|
</Text>
|
|
<Text style={styles.infoCell}>{lieu || " "}</Text>
|
|
<Text style={[styles.infoCell, styles.lastCell]}>{ronde || " "}</Text>
|
|
</View>
|
|
</View>
|
|
);
|
|
|
|
export default InfoTable;
|