Merge branch 'temp' of https://codefirst.iut.uca.fr/git/BOB_PARTEAM/BOB_PARTY into temp
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
0b2b1a071a
@ -1,9 +0,0 @@
|
||||
|
||||
const tabSex = [
|
||||
{ label: "Homme", value: "Homme" },
|
||||
{ label: "Femme", value: "Femme" },
|
||||
{ label: "Non-binaire", value: "Non-binaire" },
|
||||
{ label: "Autre", value: "Autre" },
|
||||
]
|
||||
|
||||
export default tabSex;
|
@ -0,0 +1,14 @@
|
||||
import { Skin } from "./core/skin";
|
||||
|
||||
let tabSkinApp:Skin[]=[
|
||||
new Skin("S0001", "Bob",require('bob_party/assets/BobsSkins/BobClassic.png'), 0),
|
||||
new Skin("S0002", "Bob Blue",require('bob_party/assets/BobsSkins/BobBlue.png'), 100),
|
||||
new Skin("S0003", "Bob BW",require('bob_party/assets/BobsSkins/BobBW.png'), 100),
|
||||
new Skin("S0004", "Bob Green",require('bob_party/assets/BobsSkins/BobGreen.png'), 100),
|
||||
new Skin("S0005", "Bob P&T",require('bob_party/assets/BobsSkins/BobPinkTurquoise.png'), 100),
|
||||
new Skin("S0006", "Bob Red",require('bob_party/assets/BobsSkins/BobRed.png'), 100),
|
||||
new Skin("S0007", "Bob Cute",require('bob_party/assets/BobsSkins/BobYellowGreenBlueHeart.png'), 100),
|
||||
]
|
||||
|
||||
|
||||
export default tabSkinApp;
|
@ -1,26 +0,0 @@
|
||||
import { loginUser } from '../../redux/features/currentUserSlice';
|
||||
import { updateIncorrectCredentials } from '../../redux/features/credentialErrorsSlice';
|
||||
import tabUS from "../../constUser";
|
||||
import { useSelector } from 'react-redux';
|
||||
import { RootState } from '../../redux/store';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const checkCredentials = (login: string, password: string, dispatch: any, nav: any) => {
|
||||
if((tabUS.map((User) => User.getUsername()).indexOf(login)) !== -1){
|
||||
let id = (tabUS.map((User) => User.getUsername()).indexOf(login))
|
||||
if ((tabUS.map((User) => User.getUsername()).indexOf(login) === id) && ( tabUS[id].getPassword() === password) ){
|
||||
dispatch(loginUser(tabUS[id]));
|
||||
nav.navigate('HomeTab')
|
||||
}
|
||||
else{
|
||||
dispatch(updateIncorrectCredentials(true))
|
||||
}
|
||||
}
|
||||
else{
|
||||
dispatch(updateIncorrectCredentials(true));
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in new issue