id를 찾을수 없다고 오류가 나네요 ㅠㅠ 도와주세요 ㅠㅠ

import React,{useState} from ‘react’;

import {View, Text, Button, TextInput, TouchableOpacity } from ‘react-native’;

export function Login({props, navigation }) {

const UserLoginFunction = () =>{

const [id, setId] = useState('');

const [password, setPw] = useState('');

fetch(‘https://localhost/User_Login.php’, {

 method: 'POST',

 headers: {

   'Accept': 'application/json', 

   'Content-Type': 'application/json',

 },

 body: JSON.stringify({



   email: id,



   password: password



 })

}).then((response) => response.json())

     .then((responseJson) => {



       // If server response message same as Data Matched

      if(responseJson === 'Data Matched')

       {



           //Then open Profile activity and send user email to profile activity.

           this.props.navigation.navigate('Detail');



       }

       else{



         Alert.alert(responseJson);

       }



     }).catch((error) => {

       console.error(error);

     });

    }

return (

<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> 

  <Text>메인 페이지</Text>

  

  <Text>{` 아이디는 : ${id}`}</Text>

  <Text>{` 비밀번호는 : ${password} `}</Text>

  <TextInput 

    style={{height:40, borderColor:'gray',borderWidth:1}}  

    value={id} 

    onChange={e=> setId(e.target.value)} 

 >

  </TextInput>

  <TextInput 

    style={{height:40, borderColor:'gray',borderWidth:1}}  

    value={password}

    onChange={e=> setPw(e.target.value)}

    >

  </TextInput>



  <Button

    title="Go to Details"

    onPress={() => {

      navigation.navigate('Mypage', { 

        itemID : 86, 

        otherParam : 'Hello world'

      });

    }}

    />

  

    <Button

    title="로그인"

    onPress={() => {

      navigation.navigate('Member',{ 



        name: '로그인 완료',

        id: id,

        password: password 

      });

    }}

    />

<View style={{marginTop: 10}}>

<TouchableOpacity

  style={{ alignSelf: 'stretch',

  backgroundColor: '#01c853',

  padding: 20,

  alignItems: 'center'}}

  onPress={UserLoginFunction}>

  <Text>Login</Text>

  </TouchableOpacity>
</View>

)}

export default Login;

코드를 넣을 때 코드 블럭 설정을 하면 코드가 좀 더 보기 편하게 나옵니다. 참고하세요~ :wink:

코드 보기가 힘드네요 ㅠ 바디를 string으로 변환해서 전송하신 것 같은데 json형식으로 해보세요