-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat : modify the Navigation Structure
- 갤러리 or 직접 찍는 Screen 과 실제 필터를 적용하는 화면을 분리 - Nested Navigatior 적용
- Loading branch information
1 parent
f6cfd45
commit 5bca469
Showing
7 changed files
with
128 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import {View, Text} from 'react-native'; | ||
|
||
function FilterCameraResultScreen() { | ||
return ( | ||
<View> | ||
<Text> 결과 창</Text> | ||
</View> | ||
); | ||
} | ||
|
||
export default FilterCameraResultScreen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import React, {useState} from 'react'; | ||
import {Image, Text, View, StyleSheet} from 'react-native'; | ||
import {filterCameraOptions} from '../../static/imagePickerOption'; | ||
import {LaunchCamera, LaunchGallery} from '../../utils/imagePicker'; | ||
import FilterCamerBtn from './FilterCamerBtn'; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
flexDirection: 'column', | ||
}, | ||
content: { | ||
flex: 4, | ||
}, | ||
footer: { | ||
flex: 1, | ||
flexDirection: 'row', | ||
flexWrap: 'wrap', | ||
}, | ||
img: { | ||
width: 100, | ||
height: 200, | ||
}, | ||
btn: {}, | ||
}); | ||
|
||
function FilterCameraSelctionScreen() { | ||
const [photoUri, setPhotoUri] = useState<string>(''); | ||
const CameraBtnClickListener = (): void => { | ||
LaunchCamera(filterCameraOptions) | ||
.then((newUri) => { | ||
setPhotoUri(newUri); | ||
}) | ||
.catch((err) => { | ||
Error(err); | ||
}); | ||
}; | ||
|
||
const GalleryBtnClickListener = (): void => { | ||
LaunchGallery(filterCameraOptions) | ||
.then((newUri) => { | ||
setPhotoUri(newUri); | ||
}) | ||
.catch((err) => { | ||
Error(err); | ||
}); | ||
}; | ||
|
||
const SubmitBtnClickListener = () => { | ||
console.log('제출!'); | ||
}; | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<View style={styles.content}> | ||
{photoUri !== '' ? ( | ||
<Image | ||
style={styles.img} | ||
source={{ | ||
uri: `${photoUri}`, | ||
}} | ||
/> | ||
) : ( | ||
<Text>사진이 아직 없어요!</Text> | ||
)} | ||
</View> | ||
<View style={styles.footer}> | ||
<FilterCamerBtn | ||
title="카메라" | ||
style={styles.btn} | ||
onPressFunc={CameraBtnClickListener} | ||
/> | ||
<FilterCamerBtn | ||
title="갤러리" | ||
style={styles.btn} | ||
onPressFunc={GalleryBtnClickListener} | ||
/> | ||
<FilterCamerBtn | ||
title="제출" | ||
style={styles.btn} | ||
onPressFunc={SubmitBtnClickListener} | ||
/> | ||
</View> | ||
</View> | ||
); | ||
} | ||
|
||
export default FilterCameraSelctionScreen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters