2024-12-09 21:57:59 +00:00
|
|
|
import * as SecureStore from '@/utils/SecureStore'
|
2024-12-09 21:29:48 +00:00
|
|
|
import { useRouter } from 'expo-router'
|
|
|
|
import { FAB, List, Surface } from 'react-native-paper'
|
2024-12-09 17:29:48 +00:00
|
|
|
|
|
|
|
export default function HistoryScreen() {
|
2024-12-09 21:29:48 +00:00
|
|
|
const router = useRouter()
|
|
|
|
const isLoggedIn = SecureStore.getItem("apiToken") !== null
|
2024-12-09 17:29:48 +00:00
|
|
|
return (
|
2024-12-09 21:29:48 +00:00
|
|
|
<Surface
|
|
|
|
style={{ flex: 1 }}>
|
|
|
|
<List.Item
|
|
|
|
title="Connexion au serveur"
|
|
|
|
description={isLoggedIn ? "Vous êtes déjà connecté⋅e" : "Vous n'êtes pas connecté⋅e"}
|
|
|
|
right={() => <FAB icon="login" size="small" onPress={() => router.navigate('/login')} />}
|
|
|
|
onPress={() => router.navigate('/login')} />
|
2024-12-09 20:00:15 +00:00
|
|
|
</Surface>
|
2024-12-09 17:29:48 +00:00
|
|
|
)
|
|
|
|
}
|