diff --git a/components/home/userSettings/Setting.tsx b/components/home/Setting.tsx similarity index 85% rename from components/home/userSettings/Setting.tsx rename to components/home/Setting.tsx index 6b480d5..9089f82 100644 --- a/components/home/userSettings/Setting.tsx +++ b/components/home/Setting.tsx @@ -1,7 +1,7 @@ -import { View, Text, StyleSheet, Switch, SwitchProps, useColorScheme, TouchableOpacityProps, TouchableOpacity } from 'react-native' -import React from 'react' -import { SIZES } from '../../../constants/theme' -import { useTheme } from '../../../app/contexts/ThemeContext'; +import React from 'react'; +import { StyleSheet, Switch, SwitchProps, Text, TouchableOpacity, TouchableOpacityProps, View } from 'react-native'; +import { useTheme } from '../../app/contexts/ThemeContext'; +import { SIZES } from '../../constants/theme'; interface ToggleSettingProps extends SwitchProps { settingsTitle: string; diff --git a/components/home/Welcome/Welcome.tsx b/components/home/Welcome.tsx similarity index 88% rename from components/home/Welcome/Welcome.tsx rename to components/home/Welcome.tsx index 4c766b1..dd871f4 100644 --- a/components/home/Welcome/Welcome.tsx +++ b/components/home/Welcome.tsx @@ -1,8 +1,8 @@ import React from 'react' import { Image, Text, View, ViewProps } from 'react-native' import { TouchableOpacity } from 'react-native-gesture-handler' -import { MARGINS, SIZES } from '../../../constants/theme' -import { useTheme } from '../../../app/contexts/ThemeContext' +import { MARGINS, SIZES } from '../../constants/theme' +import { useThemeColor } from '../../hooks/useThemeColor' type WelcomeProps = ViewProps & {name: string, image : any, onPress: () => void | undefined} @@ -28,13 +28,13 @@ function getTimeOfDay(date: Date) : string { export default function Welcome(props: WelcomeProps) { - const {colors} = useTheme() const date = new Date() const dateString = formatDate(date) const timeOfDay = getTimeOfDay(date) const onpress = props.onPress - const textcolor = colors.primaryText + const textcolor = useThemeColor("primaryText") + //const backgroundColor: string = useThemeColor("backgroundColor") return ( @@ -28,7 +23,7 @@ export default function ExpenseItem(itemProps : ExpenseItemProps) { {date.format("DD.MM.YYYY")} + }} numberOfLines={1}>{itemProps.date}