import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View, Button } from 'react-native';
import React, { useState } from "react";
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import HomeScreen from '../screens/HomeScreen';
import ListScreen from '../screens/ListScreen';
import ListFav from '../screens/ListFav';
import TabBarIcon from '../components/TabBarIcon';
import StackNavigation from './StackNavigation';
import { Ionicons } from '@expo/vector-icons';
import { HeaderButton, HeaderButtons, Item } from 'react-navigation-header-buttons';
import { switchMode } from '../redux/actions/action_switchMode';
import {useDispatch, useSelector} from 'react-redux';
//@ts-ignore
function fHeaderButton(props) {
//@ts-ignore
return ;
}
export default function Navigation() {
const BottomTabNavigator = createBottomTabNavigator();
//@ts-ignore
const mode = useSelector(state => state.appReducer.mode);
const dispatch = useDispatch();
return (
,
}}/>
,
headerRight: () => (
-
dispatch(switchMode(mode === 'light' ? 'dark' : 'light'))}
/>
),
}}
/>
,
}}/>
)
}