-
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 : [게시글 상세 조회] 상단 바 컴포넌트 (#91)
* feat : 게시글 상세조회 상단 바 팝업 구현 - 수정 클릭 시 새 페이지로 이동 - 삭제 클릭 시 API 호출 및 모달 창 띄우기 * feat : 게시글 삭제 컨트롤러 테스트 작성 * refactor : 게시글 삭제 시 ArticleDetailScreen 띄우기 * refactor : 1차 리뷰 반영 - truncate 추가 - state 분리 * chore : develop과 병합
- Loading branch information
Showing
12 changed files
with
202 additions
and
19 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
Empty file.
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 |
---|---|---|
@@ -1,20 +1,23 @@ | ||
/** | ||
* @author kouz95 | ||
* @author jnsorn | ||
*/ | ||
|
||
import React from "react"; | ||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { RecoilRoot } from "recoil/dist"; | ||
import BottomTabNavigation from "./src/components/Navigation/BottomTabNavigation"; | ||
import { MenuProvider } from "react-native-popup-menu"; | ||
|
||
console.disableYellowBox = true; | ||
|
||
export default function App() { | ||
return ( | ||
<RecoilRoot> | ||
<NavigationContainer> | ||
<BottomTabNavigation /> | ||
</NavigationContainer> | ||
<MenuProvider> | ||
<NavigationContainer> | ||
<BottomTabNavigation /> | ||
</NavigationContainer> | ||
</MenuProvider> | ||
</RecoilRoot> | ||
); | ||
} |
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,76 @@ | ||
import React from "react"; | ||
import { Modal, View, StyleSheet, Text, Button } from "react-native"; | ||
import { useRecoilState } from "recoil/dist"; | ||
import { articleDetailModalState } from "../../../states/modalState"; | ||
import theme from "../../../colors"; | ||
import { useNavigation } from "@react-navigation/native"; | ||
import { ArticleDetailNavigationProp } from "../../../types/types"; | ||
|
||
export default function ArticleDeleteModal() { | ||
const navigation = useNavigation<ArticleDetailNavigationProp>(); | ||
const [modalVisible, setModalVisible] = useRecoilState( | ||
articleDetailModalState, | ||
); | ||
|
||
return ( | ||
<Modal | ||
animationType="fade" | ||
transparent={true} | ||
visible={modalVisible} | ||
onRequestClose={() => setModalVisible(false)} | ||
> | ||
<View style={styles.centeredView}> | ||
<View style={styles.modalView}> | ||
<Text style={styles.modalText}> 삭제되었습니다. </Text> | ||
<Button | ||
title={"목록으로 이동"} | ||
onPress={() => { | ||
setModalVisible(false); | ||
navigation.navigate("FeedHome"); | ||
}} | ||
color={theme.primary} | ||
/> | ||
</View> | ||
</View> | ||
</Modal> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
centeredView: { | ||
flex: 1, | ||
justifyContent: "center", | ||
alignItems: "center", | ||
marginTop: 22, | ||
}, | ||
modalView: { | ||
margin: 20, | ||
backgroundColor: "#fff", | ||
borderRadius: 20, | ||
padding: 25, | ||
alignItems: "center", | ||
shadowColor: "#000", | ||
shadowOffset: { | ||
width: 3, | ||
height: 5, | ||
}, | ||
shadowOpacity: 0.25, | ||
shadowRadius: 3.84, | ||
elevation: 3, | ||
}, | ||
closeButton: { | ||
backgroundColor: "#dfd3c3", | ||
borderRadius: 20, | ||
padding: 10, | ||
elevation: 2, | ||
}, | ||
textStyle: { | ||
color: "white", | ||
fontWeight: "bold", | ||
textAlign: "center", | ||
}, | ||
modalText: { | ||
marginBottom: 15, | ||
textAlign: "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