Merge branch 'Persistance' of https://codefirst.iut.uca.fr/git/BOB_PARTEAM/BOB_PARTY into Persistance

Persistance
Mathilde JEAN 2 years ago
commit da48c22b35

@ -8,7 +8,6 @@ import React, { useCallback } from 'react';
import { useUserStore } from './userContext';
export const MANAGER_USER = new ManagerUser(new LoaderUserApi, new FakeSaverUser);
@ -53,4 +52,3 @@ export const MANAGER_USER = new ManagerUser(new LoaderUserApi, new FakeSaverUser
}

@ -6,9 +6,6 @@ import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
import { FlatList } from 'react-native-gesture-handler';
import { ConversationComponent } from '../components/ConversationComponent';
import { useSelector } from 'react-redux';
import { RootState } from '../redux/store';
import { MANAGER_USER } from '../../App';
function Chat(props: { navigation: any; }) {
const { navigation } = props
@ -20,7 +17,8 @@ function Chat(props: { navigation: any; }) {
nav={navigation}
/>
<View style={stylesScreen.bodyStart}>
{/*
{/*
<FlatList
data={MANAGER_USER.getCurrentUser().getTabConv()}
renderItem={({item}) => <ConversationComponent conv={item} state='Preview'/>}

@ -8,8 +8,6 @@ import { BotBar } from '../components/BotBar';
import { SkinComponent } from '../components/Skin';
import { ButtonGreySmall } from '../components/ButtonGreySmall';
import { ScreenIndicator } from '../components/ScreenIndicator';
import { useSelector } from 'react-redux';
import { RootState } from '../redux/store';
import { MANAGER_USER } from '../../App';
const coin = require('../../assets/Icons/Coin.png')
@ -42,6 +40,7 @@ function Profile(props: { navigation: any; }) {
</View>
<View style={styles.infoView}>
<Text style={styles.infoText}>Total de BobCoin gagnés: {MANAGER_USER.getCurrentUser().getTotalCoins()}</Text>
<Text style={styles.infoText}>Total de BobCoin gagnés: </Text>
</View>
</View>
<BotBar

@ -94,7 +94,6 @@ function Settings(props: { navigation: any; }) {
</DialogInput>
</View>
);
}

@ -20,8 +20,6 @@ function SignIn(props: { navigation: any; }) {
const setUser = useUserStore((state) => state.setUser);
const errorList = useSelector((state: RootState) => state.credentialErrors.loginErrorList);
const [pseudo, setPseudo] = useState('');
const [password, setPassword] = useState('');
const dispatch=useDispatch();
@ -32,7 +30,6 @@ function SignIn(props: { navigation: any; }) {
}
const handleUserConnect = useCallback(async (pseudo: string, password: string) => {
const us =await MANAGER_USER.getLoaderUser().loadByUsernamePassword(pseudo, password).then((res) => {
@ -52,17 +49,16 @@ function SignIn(props: { navigation: any; }) {
return (
<View style={stylesScreen.container}>
<View style={stylesScreen.bodyCenter}>
<TextInput style={styles.textInput} placeholder='Login' onChangeText={(val) => setPseudo(val)} autoCapitalize='none' />
<TextInput style={styles.textInput} placeholder='Password' onChangeText={(val) => setPassword(val)} autoCapitalize='none' secureTextEntry={true}/>
<Pressable style={styles.button} onPress={() => handleUserConnect(pseudo, password)}>
<Text style={styles.text}>Se connecter</Text>
</Pressable>
<Pressable onPress={() => navigation.navigate('SignUp')}>
<Text style={styles.textLink}>Pas de compte? Inscrivez vous !</Text>
</Pressable>
</View>
{/*
<Dialog.Container visible={false}>
<Dialog.Title>Ce pseudo n'exsite pas</Dialog.Title>
<Dialog.Button label="Fermer" onPress={() => dispatch(updateIncorrectCredentials(false))} />
@ -71,6 +67,7 @@ function SignIn(props: { navigation: any; }) {
<Dialog.Title>Mot de passe incorrect</Dialog.Title>
<Dialog.Button label="Fermer" onPress={() => dispatch(updateIncorrectCredentials(false))} />
</Dialog.Container>
*/}
</View>
);

@ -7,8 +7,6 @@ import { BotBar } from '../components/BotBar';
import { FlatList } from 'react-native-gesture-handler';
import { SkinComponent } from '../components/Skin';
import { ScreenIndicator } from '../components/ScreenIndicator';
import { useSelector } from 'react-redux';
import { RootState } from '../redux/store';
import { MANAGER_USER } from '../../App';
function Store(props: { navigation: any; }) {

@ -6719,7 +6719,7 @@ react-native-date-picker@^4.2.5:
react-native-dialog-input@^1.0.8:
version "1.0.8"
resolved "https://registry.npmjs.org/react-native-dialog-input/-/react-native-dialog-input-1.0.8.tgz"
resolved "https://registry.yarnpkg.com/react-native-dialog-input/-/react-native-dialog-input-1.0.8.tgz#6813d3b158bbb85d83a94310f38695d9f2b02682"
integrity sha512-W9YNMt6r+rUUMDEkOR1WMuGfSJw97ujB8H1xp8TjJTOnYVSlsf4aEP6t+J8tVk3XZaDcTawXgDjxH6E1WVWRog==
react-native-dialog@^9.2.2:

Loading…
Cancel
Save