// React import { View, Text, StyleSheet } from 'react-native'; import { useTranslation } from 'react-i18next'; // Expo import { Slot } from 'expo-router'; // Contexts import { useAuth } from '@/contexts/authContext'; import { useTeam } from '@/contexts/teamContext'; // Components import { IconButton } from '@/components/common/IconButton'; // Constants import { COLORS } from '@/config'; const GameLayout = () => { const { t, i18n } = useTranslation(); const { logout } = useAuth(); const { teamName } = useTeam(); const toggleLanguage = () => { i18n.changeLanguage(i18n.language === 'fr' ? 'en' : 'fr'); }; const formatText = (text, limit) => { if (text == null) return t("common.no_value"); if (text.length > limit) { return text.substring(0, limit) + "..."; } else { return text; } }; return ( {formatText(teamName, 22)} ); }; export default GameLayout; const styles = StyleSheet.create({ globalContainer: { flex: 1 }, headerContainer: { backgroundColor: COLORS.background, flexDirection: "row", alignItems: "center", padding: 10, gap: 10, elevation: 10, }, name: { fontSize: 30, fontWeight: "bold", textAlign: "center", flex: 1 }, logoutIcon: { width: 50, height: 50 }, traductionIcon: { width: 60, height: 60 } });