From 6d6473ca787fdbc88398a9fc7013403cd76dbbb7 Mon Sep 17 00:00:00 2001 From: MariaZ Date: Mon, 19 Sep 2022 21:17:09 +0200 Subject: [PATCH] Add translations to StatsTable --- components/common/StatsTable.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/components/common/StatsTable.js b/components/common/StatsTable.js index 19382c7..8da9aa1 100644 --- a/components/common/StatsTable.js +++ b/components/common/StatsTable.js @@ -67,19 +67,23 @@ StatsTable.propTypes = { const ItemDivider = () => -const FlatListHeader = () => ( - - - {'Cycle Start'} +const FlatListHeader = () => { + const { t } = useTranslation(null, { keyPrefix: 'stats' }) + + return ( + + + {t('cycle_start')} + + + {t('cycle_length')} + + + {t('bleeding')} + - - {'Cycle Length'} - - - {'Bleeding'} - - -) + ) +} const styles = StyleSheet.create({ accentCell: {