You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
942 B
34 lines
942 B
import {StatusBar} from 'expo-status-bar';
|
|
import {StyleSheet, Text, View} from 'react-native';
|
|
import {JokeStub} from "./model/JokeStub";
|
|
import {JokeFactory} from "./model/JokeFactory";
|
|
import {loadExtensions} from "./extensions";
|
|
loadExtensions();
|
|
|
|
export default function App() {
|
|
let customJokes = JokeFactory.createCustomJokes(JokeStub.customJokes);
|
|
let samplesJokes = JokeFactory.createSampleJokes(JokeStub.sampleJokes);
|
|
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text>CustomJokes</Text>
|
|
<Text>{customJokes.displayJoke()}</Text>
|
|
<Text>SamplesJokes</Text>
|
|
<Text>{samplesJokes.displayJoke()}</Text>
|
|
|
|
<StatusBar style="auto"/>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
// Styles pour le composant
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
backgroundColor: '#fff',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
});
|
|
|