Fix: Correction d'erreurs dans les écrans

typescript
Thomas Chazot 2 years ago
parent b9e5899d73
commit 28a93dd14e

@ -0,0 +1,13 @@
import { FC, ReactNode } from "react"
import { Button, Image, Text, View } from "react-native"
import { Skin } from "../core/Skin"
/*
export const SkinComponent : FC<{skin: Skin, children: ReactNode}> = ({skin, children}) => {
return <View>
<Image source={{uri: skin.source}}/>
<Text>{t}</Text>
</View>
}
*/

@ -8,7 +8,7 @@ const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png');
const message = require('../../assets/Icons/Selected/SChat.png');
const store = require('../../assets/Icons/UnSelected/Store.png');
function Store(props) {
function Store(props: { navigation: any; }) {
const { navigation } = props
return (
<View style={styles.container}>
@ -55,7 +55,7 @@ function Store(props) {
}
function Button(props) {
function Button(props: { onPress: any; title?: "Save" | undefined; }) {
const { onPress, title = 'Save' } = props;
return (
<Pressable style={styles.button} onPress={onPress}>

@ -62,7 +62,7 @@ function Home(props: { navigation: any; }) {
}
function Button(props) {
function Button(props: { onPress: any; title?: any | undefined; }) {
const { onPress, title = 'Save' } = props;
return (
<Pressable style={styles.button} onPress={onPress}>

@ -5,7 +5,7 @@ import React from 'react';
const msc = require('../../assets/Icons/FondGris.png');
const engrenage = require('../../assets/Icons/Cross.png');
function Store(props) {
function Store(props: { navigation: any; }) {
const { navigation } = props
return (
<View style={styles.container}>
@ -30,7 +30,7 @@ function Store(props) {
}
function Button(props) {
function Button(props: { onPress: any; title?: any | undefined; }) {
const { onPress, title = 'Save' } = props;
return (
<Pressable style={styles.button} onPress={onPress}>

@ -8,7 +8,7 @@ const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png');
const message = require('../../assets/Icons/UnSelected/Chat.png');
const store = require('../../assets/Icons/Selected/SStore.png');
function Store(props) {
function Store(props: { navigation: any; }) {
const { navigation } = props
return (
<View style={styles.container}>
@ -55,7 +55,7 @@ function Store(props) {
}
function Button(props) {
function Button(props: { onPress: any; title?: any | undefined; }) {
const { onPress, title = 'Save' } = props;
return (
<Pressable style={styles.button} onPress={onPress}>

@ -11,7 +11,7 @@ const BobGreen = require('../../assets/BobsSkins/BobGreen.png');
function Test(props) {
function Test(props: { navigation: any; }) {
const { navigation } = props
const [skin, setSkin] = useState([

Loading…
Cancel
Save