커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
혼자 공부 하면서 질문이 생겼습니다.
[왕초보] 나만의 수익성 앱, 앱개발 종합반 v5
기타
북마크
김*승
댓글
4
추천
0
조회수
31
조회수
31
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


왜 navigation이 사용되지 않는지 궁금합니다.



보고 계신 화면 전체를 캡처해 주

시면, 튜터님들이 빠르게 상황을 이해할 수 있어요.




import React from "react";

import { SafeAreaView, View, Text, Image, StyleSheet, TouchableOpacity } from "react-native";


export default function Profile({content, navigation}) {

return(

<TouchableOpacity style={styles.container} onPress={()=>{navigation.navigate('ProfilePage')}}>

<Image style={styles.myimage} source={{uri:content.Image}}/>

<View style={styles.titlecontainer}>

<Text style={styles.title}>

{content.title}

</Text>

<Text style={styles.desc}>

{content.desc}

</Text>

</View>

</TouchableOpacity>

)

}


const styles = StyleSheet.create({

container: {

flexDirection: 'row',

margin:3,

borderBottomWidth:0.5,

borderBottomColor:"skyblue",

borderRadius: 12,

},

myimage: {

flex: 1,

width: 100,

height: 100,

borderRadius: 10,

},

titlecontainer: {

flex: 2,

flexDirection: 'column',

marginLeft: 10,

},

title: {

flex: 1,

fontSize: 25,

fontWeight: '700',

height: 30,

},

desc: {

flex: 3,

fontSize: 17,

fontWeight: '500',

marginTop: 5,

},

})


import React from "react";

import { createStackNavigator } from '@react-navigation/stack';


import MainPage from '../pages/MainPage'

import ProfilePage from '../pages/ProfilePage'


const Stack = createStackNavigator();


const Pagecut = () => {

return(


<Stack.Navigator>

<Stack.Screen name='MainPage' component={MainPage}

options={{

title: 'Roading',

headerStyle: {

backgroundColor: "#fff",

},

headerTitleStyle: {

fontSize: 20,

fontWeight: '600',

}

}}/>

<Stack.Screen name='ProfilePage' component={ProfilePage}/>

</Stack.Navigator>


)

}

export default Pagecut;


취소
 공유
취소
댓글 0
댓글 알림
나의얼굴