From 07a865b9c81145f4bd96ca493e0ff05a8740ebd1 Mon Sep 17 00:00:00 2001 From: Remi REGNAULT Date: Mon, 27 Nov 2023 09:17:49 +0100 Subject: [PATCH] profiles was not displayed as it should, now working --- LeftOvers/components/ListSelect.tsx | 2 +- LeftOvers/components/ProfileDetails.tsx | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/LeftOvers/components/ListSelect.tsx b/LeftOvers/components/ListSelect.tsx index 55d9704..e4fc101 100644 --- a/LeftOvers/components/ListSelect.tsx +++ b/LeftOvers/components/ListSelect.tsx @@ -6,7 +6,7 @@ import { MultipleSelectList, SelectList } from 'react-native-dropdown-select-lis type ListProps = { title: string - content : list + content : string[] } export default function ListSelect(props: ListProps) { diff --git a/LeftOvers/components/ProfileDetails.tsx b/LeftOvers/components/ProfileDetails.tsx index 9b7ef35..78d73a5 100644 --- a/LeftOvers/components/ProfileDetails.tsx +++ b/LeftOvers/components/ProfileDetails.tsx @@ -1,14 +1,14 @@ import React, { useState } from 'react'; -import {StyleSheet, Text, TextInput, View, Image, Pressable, FlexStyle} from 'react-native'; -import ValidateButton from './ValidateButton'; -import ListWithoutSelect from './ListWithoutSelect'; +import { StyleSheet, Text, View, Image, Pressable } from 'react-native'; import { useNavigation } from '@react-navigation/native'; +import ListWithoutSelect from './ListWithoutSelect'; + type ProfileProps = { name: string avatar: string - diets: list - allergies: list + diets: string[] + allergies: string[] onDeleteProfile: () => void } @@ -41,9 +41,7 @@ export default function ProfileDetails(props) { {props.name} - navigation.navigate('ProfileModification')}> - - + @@ -55,7 +53,7 @@ export default function ProfileDetails(props) { - +