diff --git a/src/components/Animations/AnimatedBottomBar.tsx b/src/components/Animations/AnimatedBottomBar.tsx index 600526a..91bd2c4 100644 --- a/src/components/Animations/AnimatedBottomBar.tsx +++ b/src/components/Animations/AnimatedBottomBar.tsx @@ -28,7 +28,7 @@ import { FAB, IconButton, Surface, withTheme } from 'react-native-paper'; import * as Animatable from 'react-native-animatable'; import { StackNavigationProp } from '@react-navigation/stack'; import AutoHideHandler from '../../utils/AutoHideHandler'; -import CustomTabBar, { TAB_BAR_HEIGHT } from '../Tabbar/CustomTabBar'; +import { TAB_BAR_HEIGHT } from '../Tabbar/CustomTabBar'; const AnimatedFAB = Animatable.createAnimatableComponent(FAB); diff --git a/src/components/Animations/AnimatedFAB.tsx b/src/components/Animations/AnimatedFAB.tsx index debd674..843789d 100644 --- a/src/components/Animations/AnimatedFAB.tsx +++ b/src/components/Animations/AnimatedFAB.tsx @@ -27,7 +27,7 @@ import { import { FAB } from 'react-native-paper'; import * as Animatable from 'react-native-animatable'; import AutoHideHandler from '../../utils/AutoHideHandler'; -import CustomTabBar, { TAB_BAR_HEIGHT } from '../Tabbar/CustomTabBar'; +import { TAB_BAR_HEIGHT } from '../Tabbar/CustomTabBar'; type PropsType = { icon: string; diff --git a/src/components/Overrides/CustomModal.tsx b/src/components/Overrides/CustomModal.tsx index 5aa8fc0..571d4ee 100644 --- a/src/components/Overrides/CustomModal.tsx +++ b/src/components/Overrides/CustomModal.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import { useTheme } from 'react-native-paper'; import { Modalize } from 'react-native-modalize'; import { View } from 'react-native-animatable'; -import CustomTabBar, { TAB_BAR_HEIGHT } from '../Tabbar/CustomTabBar'; +import { TAB_BAR_HEIGHT } from '../Tabbar/CustomTabBar'; /** * Abstraction layer for Modalize component, using custom configuration diff --git a/src/navigation/MainNavigator.tsx b/src/navigation/MainNavigator.tsx index d881cab..9bfcd5b 100644 --- a/src/navigation/MainNavigator.tsx +++ b/src/navigation/MainNavigator.tsx @@ -46,7 +46,6 @@ import EquipmentConfirmScreen from '../screens/Amicale/Equipment/EquipmentConfir import DashboardEditScreen from '../screens/Other/Settings/DashboardEditScreen'; import GameStartScreen from '../screens/Game/screens/GameStartScreen'; import ImageGalleryScreen from '../screens/Media/ImageGalleryScreen'; -import Test from '../screens/Test'; export enum MainRoutes { Main = 'main', @@ -102,8 +101,10 @@ function MainStackComponent(props: { }) { const { createTabNavigator } = props; return ( - - + { ); getItemLayout = ( - data: Array | null | undefined, + _data: Array | null | undefined, index: number ): { length: number; offset: number; index: number } => ({ length: LIST_ITEM_HEIGHT, diff --git a/src/screens/Amicale/Clubs/ClubDisplayScreen.tsx b/src/screens/Amicale/Clubs/ClubDisplayScreen.tsx index fdae27f..50aefc9 100644 --- a/src/screens/Amicale/Clubs/ClubDisplayScreen.tsx +++ b/src/screens/Amicale/Clubs/ClubDisplayScreen.tsx @@ -31,9 +31,7 @@ import i18n from 'i18n-js'; import { StackNavigationProp } from '@react-navigation/stack'; import AuthenticatedScreen from '../../../components/Amicale/AuthenticatedScreen'; import CustomHTML from '../../../components/Overrides/CustomHTML'; -import CustomTabBar, { - TAB_BAR_HEIGHT, -} from '../../../components/Tabbar/CustomTabBar'; +import { TAB_BAR_HEIGHT } from '../../../components/Tabbar/CustomTabBar'; import type { ClubCategoryType, ClubType } from './ClubListScreen'; import { ERROR_TYPE } from '../../../utils/WebData'; import CollapsibleScrollView from '../../../components/Collapsible/CollapsibleScrollView'; diff --git a/src/screens/Home/FeedItemScreen.tsx b/src/screens/Home/FeedItemScreen.tsx index 95a5503..02b2cc1 100644 --- a/src/screens/Home/FeedItemScreen.tsx +++ b/src/screens/Home/FeedItemScreen.tsx @@ -25,9 +25,7 @@ import { StackNavigationProp } from '@react-navigation/stack'; import MaterialHeaderButtons, { Item, } from '../../components/Overrides/CustomHeaderButton'; -import CustomTabBar, { - TAB_BAR_HEIGHT, -} from '../../components/Tabbar/CustomTabBar'; +import { TAB_BAR_HEIGHT } from '../../components/Tabbar/CustomTabBar'; import type { FeedItemType } from './HomeScreen'; import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView'; import ImageGalleryButton from '../../components/Media/ImageGalleryButton'; diff --git a/src/screens/Home/ScannerScreen.tsx b/src/screens/Home/ScannerScreen.tsx index 350cdcf..5a48331 100644 --- a/src/screens/Home/ScannerScreen.tsx +++ b/src/screens/Home/ScannerScreen.tsx @@ -26,9 +26,7 @@ import i18n from 'i18n-js'; import { PERMISSIONS, request, RESULTS } from 'react-native-permissions'; import URLHandler from '../../utils/URLHandler'; import AlertDialog from '../../components/Dialogs/AlertDialog'; -import CustomTabBar, { - TAB_BAR_HEIGHT, -} from '../../components/Tabbar/CustomTabBar'; +import { TAB_BAR_HEIGHT } from '../../components/Tabbar/CustomTabBar'; import LoadingConfirmDialog from '../../components/Dialogs/LoadingConfirmDialog'; import { MASCOT_STYLE } from '../../components/Mascot/Mascot'; import MascotPopup from '../../components/Mascot/MascotPopup'; diff --git a/src/screens/Services/Proximo/ProximoMainScreen.tsx b/src/screens/Services/Proximo/ProximoMainScreen.tsx index 745de6c..088f069 100644 --- a/src/screens/Services/Proximo/ProximoMainScreen.tsx +++ b/src/screens/Services/Proximo/ProximoMainScreen.tsx @@ -123,10 +123,14 @@ function ProximoMainScreen() { const getHeaderButtons = () => { return ( - + @@ -181,7 +185,7 @@ function ProximoMainScreen() { )} style={{ diff --git a/src/screens/Test.tsx b/src/screens/Test.tsx deleted file mode 100644 index 9edf271..0000000 --- a/src/screens/Test.tsx +++ /dev/null @@ -1,156 +0,0 @@ -import { useNavigation } from '@react-navigation/core'; -import { StackNavigationProp } from '@react-navigation/stack'; -import React from 'react'; -import { Animated, View } from 'react-native'; -import { Text } from 'react-native-paper'; -import { - Collapsible, - useCollapsibleHeader, -} from 'react-navigation-collapsible'; -import CollapsibleFlatList from '../components/Collapsible/CollapsibleFlatList'; -import FeedItem from '../components/Home/FeedItem'; -import WebSectionList from '../components/Screens/WebSectionList'; -import withCollapsible from '../utils/withCollapsible'; -import { FeedItemType } from './Home/HomeScreen'; -import i18n from 'i18n-js'; -import CollapsibleSectionList from '../components/Collapsible/CollapsibleSectionList'; - -// export default function Test() { -// const { -// onScroll /* Event handler */, -// onScrollWithListener /* Event handler creator */, -// containerPaddingTop /* number */, -// scrollIndicatorInsetTop /* number */, -// /* Animated.AnimatedValue contentOffset from scrolling */ -// positionY /* 0.0 ~ length of scrollable component (contentOffset) -// /* Animated.AnimatedInterpolation by scrolling */, -// translateY /* 0.0 ~ -headerHeight */, -// progress /* 0.0 ~ 1.0 */, -// opacity /* 1.0 ~ 0.0 */, -// } = useCollapsibleHeader(); - -// const renderItem = () => { -// return ( -// -// TEST -// -// ); -// }; - -// return ( -// -// ); -// } - -type Props = { - navigation: StackNavigationProp; - collapsibleStack: Collapsible; -}; - -const DATA_URL = - 'https://etud.insa-toulouse.fr/~amicale_app/v2/dashboard/dashboard_data.json'; -const FEED_ITEM_HEIGHT = 500; - -const REFRESH_TIME = 1000 * 20; // Refresh every 20 seconds -class Test extends React.Component { - createDataset = (): Array<{ - title: string; - data: [] | Array; - id: string; - }> => { - return [ - { - title: 'title', - data: [ - { - id: '0', - message: 'message', - image: '', - link: '', - page_id: 'amicale.deseleves', - time: 0, - url: '', - video: '', - }, - { - id: '1', - message: 'message', - image: '', - link: '', - page_id: 'amicale.deseleves', - time: 0, - url: '', - video: '', - }, - { - id: '2', - message: 'message', - image: '', - link: '', - page_id: 'amicale.deseleves', - time: 0, - url: '', - video: '', - }, - ], - id: '0', - }, - ]; - }; - getRenderItem = ({ item }: { item: FeedItemType }) => ( - - ); - - render() { - const renderItem = () => { - return ( - - TEST - - ); - }; - - const props = this.props; - // return ( - // - // ); - // return ( - // - // ); - return ( - - ); - } -} - -export default Test;