-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature : [게시글 생성] API 연동 및 이미지 AWS S3 업로드 (#83)
* refactor: front api 분리, ArticleCreateCategorySelect 생성, loginState memberId 추가 - memberId mock 사용. * refactor: front api 분리 * refactor: articleDetail api 분리 * refactor: image -> photo 변경
- Loading branch information
Showing
3 changed files
with
52 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from "react"; | ||
import { StyleSheet, Text, TouchableOpacity } from "react-native"; | ||
import { MaterialCommunityIcons } from "@expo/vector-icons"; | ||
import { useNavigation } from "@react-navigation/native"; | ||
import { articleSelectedCategoryState } from "../states/articleState"; | ||
import { useRecoilValue } from "recoil"; | ||
import { ArticleCreateScreenNavigationProp } from "../types/types"; | ||
|
||
export default function ArticleCreateCategorySelect() { | ||
const selectedCategory = useRecoilValue(articleSelectedCategoryState); | ||
const navigation = useNavigation<ArticleCreateScreenNavigationProp>(); | ||
|
||
return ( | ||
<TouchableOpacity | ||
style={styles.button} | ||
onPress={() => navigation.navigate("CategoryChoiceScreen")} | ||
> | ||
<Text style={styles.buttonText}> | ||
{selectedCategory === "" ? "카테고리" : selectedCategory} | ||
</Text> | ||
<MaterialCommunityIcons | ||
name="chevron-down" | ||
size={22} | ||
color="black" | ||
style={styles.selectCategoryArrowIcon} | ||
/> | ||
</TouchableOpacity> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
button: { | ||
flex: 1, | ||
flexDirection: "row", | ||
height: "100%", | ||
alignItems: "center", | ||
justifyContent: "space-between", | ||
}, | ||
buttonText: { | ||
fontSize: 18, | ||
textAlign: "left", | ||
}, | ||
selectCategoryArrowIcon: { | ||
alignItems: "center", | ||
}, | ||
}); |
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