diff --git a/App.tsx b/App.tsx index 7d2f260..d9e2535 100644 --- a/App.tsx +++ b/App.tsx @@ -6,6 +6,7 @@ import React, { useState, useEffect } from "react"; import Navigation from './navigation/Navigation'; import StackNavigation from './navigation/StackNavigation'; +import { NavigationContainer, DefaultTheme } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; @@ -13,43 +14,12 @@ import {useDispatch, useSelector} from 'react-redux'; import store from './redux/store'; -import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper'; +//import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper'; // Import your application store //import store from "./redux/store"; -//* themes - -const defaultTheme = { - ...DefaultTheme, - colors: { - ...DefaultTheme.colors, - primary: 'blue', - accent: 'yellow', - background: 'white', - text: 'black', - }, -}; - -const darkTheme = { - ...DefaultTheme, - dark: true, - colors: { - ...DefaultTheme.colors, - primary: '#BB86FC', - accent: '#03DAC6', - background: '#121212', - surface: '#121212', - text: '#FFFFFF', - disabled: '#9E9E9E', - placeholder: '#9E9E9E', - backdrop: '#00000070', - }, -}; - - - import { SafeAreaView, SafeAreaProvider, diff --git a/navigation/Navigation.tsx b/navigation/Navigation.tsx index 2a1764f..22f944e 100644 --- a/navigation/Navigation.tsx +++ b/navigation/Navigation.tsx @@ -1,8 +1,8 @@ import { StatusBar } from 'expo-status-bar'; -import { StyleSheet, Text, View, Button } from 'react-native'; +import {useColorScheme, StyleSheet, Text, View, Button } from 'react-native'; import React, { useState } from "react"; -import { NavigationContainer, useTheme } from '@react-navigation/native'; +import { NavigationContainer, useTheme, DefaultTheme} from '@react-navigation/native'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import HomeScreen from '../screens/HomeScreen'; @@ -24,6 +24,8 @@ function fHeaderButton(props) { return ; } + + export default function Navigation() { const BottomTabNavigator = createBottomTabNavigator(); @@ -32,8 +34,54 @@ export default function Navigation() { const dispatch = useDispatch(); - const { colors } = useTheme(); + //* themes + //const { colors } = useTheme(); + + //const scheme = useColorScheme(); + + + +// const defaultTheme = { +// ...DefaultTheme, +// colors: { +// ...DefaultTheme.colors, +// primary: 'blue', +// accent: 'yellow', +// background: 'white', +// text: 'black', +// }, +// }; + +// const darkTheme = { +// ...DefaultTheme, +// dark: true, +// colors: { +// ...DefaultTheme.colors, +// primary: '#BB86FC', +// accent: '#03DAC6', +// background: '#121212', +// surface: '#121212', +// text: '#FFFFFF', +// disabled: '#9E9E9E', +// placeholder: '#9E9E9E', +// backdrop: '#00000070', +// }, +// }; + +// const MyTheme = { +// dark: false, +// colors: { +// primary: 'rgb(255, 45, 85)', +// background: 'rgb(242, 242, 242)', +// card: 'rgb(255, 255, 255)', +// text: 'rgb(28, 28, 30)', +// border: 'rgb(199, 199, 204)', +// notification: 'rgb(255, 69, 58)', +// }, +// }; + return ( + // { console.log("API") //const CardsPromise = await fetch('https://us.api.blizzard.com/hearthstone/cards?locale=en_US&access_token=EURTWhjBC2SRb4Ez42BT1kx8R2NcJc07kL', options); - const CardsPromise = await fetch('https://us.api.blizzard.com/hearthstone/cards?locale=en_US&access_token=EUGIkMrnzNyG68ac33y5Tpn6MUtraN3QiV', options); + //const CardsPromise = await fetch('https://us.api.blizzard.com/hearthstone/cards?locale=en_US&access_token=EUGIkMrnzNyG68ac33y5Tpn6MUtraN3QiV', options); + const CardsPromise = await fetch('https://us.api.blizzard.com/hearthstone/cards?locale=en_US&access_token=EUZvGOfXsMKYrjqLJp5mE7IJlhQuELMiPk', options); //console.log("FETCH") //console.log(CardsPromise)