maintainance: applied new Theme context to component
This commit is contained in:
parent
d64db4d316
commit
37b38d33fc
2 changed files with 7 additions and 5 deletions
|
|
@ -3,6 +3,7 @@ import { Image, Text, View, ViewProps } from 'react-native'
|
|||
import { TouchableOpacity } from 'react-native-gesture-handler'
|
||||
import { MARGINS, SIZES } from '../../../constants/theme'
|
||||
import { useThemeColor } from '../../../hooks/useThemeColor'
|
||||
import { useTheme } from '../../../app/contexts/ThemeContext'
|
||||
|
||||
type WelcomeProps = ViewProps & {name: string, image : any, onPress: () => void | undefined}
|
||||
|
||||
|
|
@ -28,12 +29,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 = useThemeColor("primaryText")
|
||||
const textcolor = colors.primaryText
|
||||
//const backgroundColor: string = useThemeColor("backgroundColor")
|
||||
|
||||
return (
|
||||
|
|
|
|||
Reference in a new issue