commit
6e55e5b9a9
@ -1,41 +0,0 @@
|
|||||||
import { StatusBar } from 'expo-status-bar';
|
|
||||||
import { StyleSheet, Text, View, Button } from 'react-native';
|
|
||||||
import React, { useState } from "react";
|
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
export default function Main(props : mainProps){
|
|
||||||
const [count, setCount] = useState(0);
|
|
||||||
return (
|
|
||||||
<View style={styles.container}>
|
|
||||||
<View style={styles.border}>
|
|
||||||
<Text>Maman, prend la caméra ! !</Text>
|
|
||||||
<StatusBar style="auto" />
|
|
||||||
<Text>{count}</Text>
|
|
||||||
<Button onPress={()=> setCount(count+1)} title="+1"/>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
container: {
|
|
||||||
flex: 1,
|
|
||||||
backgroundColor: '#ffffff',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
borderWidth: 5,
|
|
||||||
borderColor : "#ff00ff",
|
|
||||||
},
|
|
||||||
border: {
|
|
||||||
flex: 1,
|
|
||||||
backgroundColor: '#ff0000',
|
|
||||||
maxHeight : 100,
|
|
||||||
borderWidth : 15,
|
|
||||||
borderRadius : 15,
|
|
||||||
borderColor : '#00ffaa',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
}
|
|
||||||
});
|
|
@ -1,138 +1,27 @@
|
|||||||
import {isValidNumber} from "react-native-gesture-handler/lib/typescript/web_hammer/utils";
|
|
||||||
import {CardSet} from "./CardSet";
|
|
||||||
import {Type} from "./Type";
|
|
||||||
import {Classe} from "./Classe";
|
|
||||||
|
|
||||||
export class Card {
|
export class Card {
|
||||||
|
|
||||||
constructor(id: string,name :string, img : string, imgGold : string,fav : boolean = true){//,set : CardSet,type : Type,clas : Classe,rarity : string,cost : number,attack : number, health : number, desc : string,flavor : string,artist : string,collectible : boolean,elite : boolean,race : string, cropImg :string ) {
|
constructor(id: string,name :string, img : string, imgGold : string,fav : boolean = true){
|
||||||
this.id=id
|
this.id=id
|
||||||
this.name=name
|
this.name=name
|
||||||
//this._set=set
|
|
||||||
// this._type=type
|
|
||||||
// this._class=clas
|
|
||||||
// this._rarity=rarity
|
|
||||||
// this._cost=cost
|
|
||||||
// this._attack = attack
|
|
||||||
// this._health = health
|
|
||||||
// this._desc = desc
|
|
||||||
// this._flavor = flavor
|
|
||||||
// this._artist = artist
|
|
||||||
// this._collectible = collectible
|
|
||||||
this.img = img
|
this.img = img
|
||||||
this.imgGold = imgGold
|
this.imgGold = imgGold
|
||||||
// this._cropImg = cropImg
|
|
||||||
this.fav = fav
|
this.fav = fav
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ID //
|
// ID //
|
||||||
|
|
||||||
public id;
|
public id;
|
||||||
|
|
||||||
// NAME //
|
// NAME //
|
||||||
public name;
|
public name;
|
||||||
|
|
||||||
|
//IMG//
|
||||||
// private _set : CardSet;
|
|
||||||
// get set(): CardSet{
|
|
||||||
// return this._set
|
|
||||||
// }
|
|
||||||
|
|
||||||
// set set(value : CardSet){
|
|
||||||
// this._set = value
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private _type : Type;
|
|
||||||
// get type():Type{
|
|
||||||
// return this._type
|
|
||||||
// }
|
|
||||||
// set type(value : Type){
|
|
||||||
// this._type=value
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private _class : Classe;
|
|
||||||
|
|
||||||
// get class():Classe{
|
|
||||||
// return this._class
|
|
||||||
// }
|
|
||||||
// set class(value : Classe){
|
|
||||||
// this._class=value
|
|
||||||
// }
|
|
||||||
// private _rarity : string
|
|
||||||
|
|
||||||
// get rarity(): string {
|
|
||||||
// return this._rarity;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// set rarity(value: string) {
|
|
||||||
// this._rarity = value ;
|
|
||||||
// }
|
|
||||||
// private _cost : number
|
|
||||||
|
|
||||||
// get cost(): number {
|
|
||||||
// return this._cost;
|
|
||||||
// }
|
|
||||||
// set cost(value: number) {
|
|
||||||
// this._cost = value ;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private _attack : number
|
|
||||||
// get attack(): number {
|
|
||||||
// return this._attack;
|
|
||||||
// }
|
|
||||||
// set attack(value: number) {
|
|
||||||
// this._attack = value ;
|
|
||||||
// }
|
|
||||||
// private _health : number
|
|
||||||
// get health(): number {
|
|
||||||
// return this._health;
|
|
||||||
// }
|
|
||||||
// set health(value: number) {
|
|
||||||
// this._health = value ;
|
|
||||||
// }
|
|
||||||
// private _desc : string
|
|
||||||
// get desc(): string {
|
|
||||||
// return this._desc;
|
|
||||||
// }
|
|
||||||
// set desc(value: string) {
|
|
||||||
// this._desc = value ;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private _flavor : string
|
|
||||||
|
|
||||||
// get flavor(): string {
|
|
||||||
// return this._flavor;
|
|
||||||
// }
|
|
||||||
// set flavor(value: string) {
|
|
||||||
// this._flavor = value ;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private _artist : string
|
|
||||||
// get artist(): string {
|
|
||||||
// return this._artist;
|
|
||||||
// }
|
|
||||||
// set artist(value: string) {
|
|
||||||
// this._artist = value ;
|
|
||||||
// }
|
|
||||||
// private _collectible : boolean
|
|
||||||
// get collectible(): boolean {
|
|
||||||
// return this._collectible;
|
|
||||||
// }
|
|
||||||
// set collectible(value: boolean ){
|
|
||||||
// this._collectible = value;
|
|
||||||
// }
|
|
||||||
|
|
||||||
public img;
|
public img;
|
||||||
public imgGold;
|
|
||||||
// private _cropImg : string
|
|
||||||
|
|
||||||
// get cropImg(): string {
|
//IMGGOLD//
|
||||||
// return this._cropImg;
|
public imgGold;
|
||||||
// }
|
|
||||||
// set cropImg(value: string) {
|
|
||||||
// this._cropImg = value;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
//FAV//
|
||||||
public fav;
|
public fav;
|
||||||
}
|
}
|
@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
export class CardSet {
|
|
||||||
|
|
||||||
constructor(id: number,name : string, type : string ) {
|
|
||||||
this._id = id
|
|
||||||
this._name =name
|
|
||||||
this._type = type
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private _id : number
|
|
||||||
|
|
||||||
get id(): number {
|
|
||||||
return this._id
|
|
||||||
}
|
|
||||||
|
|
||||||
// NAME //
|
|
||||||
private _name : string;
|
|
||||||
get name(): string {
|
|
||||||
return this._name;
|
|
||||||
}
|
|
||||||
set name(value: string) {
|
|
||||||
this._name = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private _type : string;
|
|
||||||
get type(): string {
|
|
||||||
return this._type;
|
|
||||||
}
|
|
||||||
set type(value: string) {
|
|
||||||
this._type = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export class Classe {
|
|
||||||
constructor(private id : number, private name : string) {
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
export class Type{
|
|
||||||
|
|
||||||
constructor(private id : number, private name : string) {
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
// import { NavigationContainer } from '@react-navigation/native';
|
|
||||||
// import { createStackNavigator } from '@react-navigation/stack';
|
|
||||||
|
|
||||||
// import HomeScreen from '../screens/HomeScreen';
|
|
||||||
// import ListScreen from '../screens/ListScreen';
|
|
||||||
// import ListFav from '../screens/ListFav';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// export default function ListNavigator() {
|
|
||||||
// const Stack = createStackNavigator();
|
|
||||||
// return (
|
|
||||||
// <Stack.Navigator initialRouteName="List">
|
|
||||||
// <Stack.Screen name="List" component={ListScreen}/>
|
|
||||||
// <Stack.Screen name="ListFav" component={ListFav}/>
|
|
||||||
// </Stack.Navigator>
|
|
||||||
// )
|
|
||||||
// }
|
|
@ -1,10 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
export const FETCH_DATA = "FETCH_DATA"
|
export const FETCH_DATA = "FETCH_DATA"
|
||||||
|
|
||||||
export const ADD_FAVORITE_DATA = "ADD_FAVORITE_DATA"
|
export const ADD_FAVORITE_DATA = "ADD_FAVORITE_DATA"
|
||||||
|
|
||||||
export const DISPLAY_ALL_CARD = "DISPLAY_ALL_CARD"
|
|
||||||
|
|
||||||
export const SET_FAVS = "SET_FAVS"
|
export const SET_FAVS = "SET_FAVS"
|
||||||
|
|
||||||
|
Loading…
Reference in new issue