Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: HeaderItem tab in production that crashes the app on press #116

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mobile-app/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Colors } from '@/constants/Colors';
import { useColorScheme } from '@/hooks/useColorScheme';
import { useGroupStore } from '@/zustand/group/stateGroupStore';

import { HeaderItem } from './HeaderItem';
import { HeaderItem } from '../../components/HeaderItem';

const GroupsButton = () => {
const nav = useNavigation();
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/editFormation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React, { useState } from 'react';
import { Text, View } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { navStyles } from '@/app/navigation/navStyles';
import { useNavigation } from '@/app/navigation/useNavigation';
import CupGrid from '@/components/CupGrid';
import { Formation } from '@/components/CupGrid/Formation';
import { HeaderItem } from '@/components/HeaderItem';
import MenuItem from '@/components/Menu/MenuItem';
import MenuSection from '@/components/Menu/MenuSection';
import { theme } from '@/theme';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/editFormationName.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Stack } from 'expo-router';
import React, { useState } from 'react';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { HeaderItem } from '@/components/HeaderItem';
import InputModal from '@/components/InputModal';
import TextInput from '@/components/TextInput';
import { theme } from '@/theme';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/editGroupName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Stack, useLocalSearchParams } from 'expo-router';
import React, { useState } from 'react';

import { useGroupQuery, useUpdateGroupMutation } from '@/api/calls/groupHooks';
import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { useNavigation } from '@/app/navigation/useNavigation';
import { HeaderItem } from '@/components/HeaderItem';
import InputModal from '@/components/InputModal';
import TextInput from '@/components/TextInput';
import { theme } from '@/theme';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/editPlayerName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
useUpdatePlayerMutation,
} from '@/api/calls/playerHooks';
import { useGroup } from '@/api/calls/seasonHooks';
import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { useNavigation } from '@/app/navigation/useNavigation';
import { HeaderItem } from '@/components/HeaderItem';
import InputModal from '@/components/InputModal';
import TextInput from '@/components/TextInput';
import { theme } from '@/theme';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/editRankPlayersBy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Stack } from 'expo-router';
import React, { useState } from 'react';
import { Text } from 'react-native';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { useNavigation } from '@/app/navigation/useNavigation';
import { HeaderItem } from '@/components/HeaderItem';
import InputModal from '@/components/InputModal';
import Select from '@/components/Select';

Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/formations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import React from 'react';
import { Dimensions, Text, TouchableHighlight, View } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { navStyles } from '@/app/navigation/navStyles';
import { useNavigation } from '@/app/navigation/useNavigation';
import CupGrid from '@/components/CupGrid';
import { HeaderItem } from '@/components/HeaderItem';

const SCREEN_WIDTH = Dimensions.get('window').width;

Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/match.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { theme } from '@/theme';
import { showErrorToast, showSuccessToast } from '@/toast';
import { ConsoleLogger } from '@/utils/logging';

import { HeaderItem } from './(tabs)/HeaderItem';
import { HeaderItem } from '../components/HeaderItem';
import { useNavigation } from './navigation/useNavigation';

export default function Page() {
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/pastSeasons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Animated from 'react-native-reanimated';
import Carousel from 'react-native-reanimated-carousel';
import Swiper from 'react-native-swiper';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { navStyles } from '@/app/navigation/navStyles';
import { HeaderItem } from '@/components/HeaderItem';
import Leaderboard from '@/components/Leaderboard';
import { mockPlayers } from '@/components/mockData/players';
import SwiperHeader from '@/components/SwiperHeader';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/saveSeason.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Stack } from 'expo-router';
import React, { useState } from 'react';

import { useGroup, useStartNewSeasonMutation } from '@/api/calls/seasonHooks';
import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { navStyles } from '@/app/navigation/navStyles';
import { useNavigation } from '@/app/navigation/useNavigation';
import { HeaderItem } from '@/components/HeaderItem';
import InputModal from '@/components/InputModal';
import Podium from '@/components/Podium';
import TextInput from '@/components/TextInput';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/app/startLiveMatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { Text, View } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { runOnJS } from 'react-native-reanimated';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { navStyles } from '@/app/navigation/navStyles';
import { useNavigation } from '@/app/navigation/useNavigation';
import CupGrid from '@/components/CupGrid';
import { flipFormation, Formation } from '@/components/CupGrid/Formation';
import { HeaderItem } from '@/components/HeaderItem';
import LiveMatchCupControls from '@/components/LiveMatchCupControls';
import { theme } from '@/theme';

Expand Down
2 changes: 1 addition & 1 deletion mobile-app/components/screens/CreateGroupAddMembers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { HeaderItem } from '@/components/HeaderItem';
import { theme } from '@/theme';
import { GroupMember } from '@/zustand/group/stateCreateGroupStore';

Expand Down
2 changes: 1 addition & 1 deletion mobile-app/components/screens/CreateGroupSetName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useState } from 'react';
import { View } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { HeaderItem } from '@/components/HeaderItem';
import { theme } from '@/theme';

import TextInput from '../TextInput';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/components/screens/CreateMatchAssignPoints.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import React from 'react';
import { ScrollView } from 'react-native';

import { TeamMember } from '@/api/utils/matchDtoToMatch';
import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { navStyles } from '@/app/navigation/navStyles';
import { useNavigation } from '@/app/navigation/useNavigation';
import Button from '@/components/Button';
import { HeaderItem } from '@/components/HeaderItem';
import MatchPlayers from '@/components/MatchPlayers';
import MatchVsHeader from '@/components/MatchVsHeader';
import { Feature } from '@/constants/Features';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/components/screens/CreateNewPlayer.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Stack, useNavigation } from 'expo-router';
import React, { useState } from 'react';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import Avatar from '@/components/Avatar';
import { HeaderItem } from '@/components/HeaderItem';
import InputModal from '@/components/InputModal';
import TextInput from '@/components/TextInput';

Expand Down
2 changes: 1 addition & 1 deletion mobile-app/components/screens/NewMatchAssignTeams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { Pressable, ScrollView, Text, TouchableHighlight } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';

import { TeamMember } from '@/api/utils/matchDtoToMatch';
import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { navStyles } from '@/app/navigation/navStyles';
import { useNavigation } from '@/app/navigation/useNavigation';
import { HeaderItem } from '@/components/HeaderItem';
import MenuItem from '@/components/Menu/MenuItem';
import MenuSection, { Heading } from '@/components/Menu/MenuSection';
import { theme } from '@/theme';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/components/screens/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {

import { env } from '@/api/env';
import { Match } from '@/api/utils/matchDtoToMatch';
import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import { navStyles } from '@/app/navigation/navStyles';
import { useNavigation } from '@/app/navigation/useNavigation';
import Avatar from '@/components/Avatar';
import { HeaderItem } from '@/components/HeaderItem';
import MatchesList from '@/components/MatchesList';
import MenuItem from '@/components/Menu/MenuItem';
import MenuSection from '@/components/Menu/MenuSection';
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/components/screens/Rules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';

import { HeaderItem } from '@/app/(tabs)/HeaderItem';
import ConfirmationModal from '@/components/ConfirmationModal';
import { HeaderItem } from '@/components/HeaderItem';
import IconHead from '@/components/IconHead';
import { theme } from '@/theme';

Expand Down