mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
26 lines
580 B
TypeScript
26 lines
580 B
TypeScript
import * as React from 'react';
|
|
import { StyleSheet, Text, View } from 'react-native';
|
|
|
|
import { useTheme } from './providers/theme-provider';
|
|
import { useUser } from './providers/user-provider';
|
|
|
|
export default function WelcomeScreen() {
|
|
const theme = useTheme();
|
|
const user = useUser();
|
|
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text>Hello {user ? user.name : 'Stranger'}</Text>
|
|
<Text>Theme: {theme}</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
},
|
|
});
|