// App.js
import React, { useState } from 'react';
import { View, Text, Button, StyleSheet } from 'react-native';
import { faker } from '@faker-js/faker';

const App = () => {
    const [name, setName] = useState('');

    const generateName = () => {
        setName(faker.name.findName());
    };

    return (
        <View style={styles.container}>
            <Text style={styles.header}>Random Name Generator</Text>
            <Text style={styles.name}>{name}</Text>
            <Button title="Generate Name" onPress={generateName} />
        </View>
    );
};

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#fff',
    },
    header: {
        fontSize: 24,
        marginBottom: 20,
    },
    name: {
        fontSize: 32,
        marginBottom: 20,
    },
});

export default App;const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#fff',
    },
    header: {
        fontSize: 24,
        marginBottom: 20,
    },
    name: {
        fontSize: 32,
        marginBottom: 20,
    },
});

export default App;const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#fff',
    },
    header: {
        fontSize: 24,
        marginBottom: 20,
    },
    name: {
        fontSize: 32,
        marginBottom: 20,
    },
});

export default App;const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#fff',
    },
    header: {
        fontSize: 24,
        marginBottom: 20,
    },
    name: {
        fontSize: 32,
        marginBottom: 20,
    },
});

export default App;const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#fff',
    },
    header: {
        fontSize: 24,
        marginBottom: 20,
    },
    name: {
        fontSize: 32,
        marginBottom: 20,
    },
});

export default App;