mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
21 lines
456 B
TypeScript
21 lines
456 B
TypeScript
import * as React from 'react';
|
|
import { SafeAreaView } from 'react-native';
|
|
import { LoginForm } from './components/LoginForm';
|
|
import { Home } from './components/Home';
|
|
|
|
const App = () => {
|
|
const [user, setUser] = React.useState<string | null>(null);
|
|
|
|
return (
|
|
<SafeAreaView>
|
|
{user == null ? (
|
|
<LoginForm onLoginSuccess={setUser} />
|
|
) : (
|
|
<Home user={user} />
|
|
)}
|
|
</SafeAreaView>
|
|
);
|
|
};
|
|
|
|
export default App;
|