useTheme applied globally

This commit is contained in:
Jakob Stornig 2023-12-30 14:35:05 +01:00
parent 1f304d41f2
commit 9de2678922
12 changed files with 31 additions and 39 deletions

View file

@ -3,16 +3,17 @@ import { Redirect } from 'expo-router';
import React, { useState } from 'react';
import { Button, SafeAreaView } from 'react-native';
import { Input } from '../components';
import { useThemeColor } from '../hooks/useThemeColor';
import { useTheme } from "./contexts/ThemeContext";
import { useAuth } from './contexts/AuthContext';
export default function login() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("")
const {authState, onLogin} = useAuth()
const backgroundColor = useThemeColor("backgroundColor")
const textColor = useThemeColor("primaryText");
const elementDefaultColor = useThemeColor("elementDefaultColor")
const {colors} = useTheme()
const backgroundColor = colors.backgroundColor;
const textColor = colors.primaryText
const elementDefaultColor = colors.elementDefaultColor
// const {authState, onLogin} = useAuth();