From ba68485e5643fb39f2b784a34bd620011f67f9c1 Mon Sep 17 00:00:00 2001 From: 11t518s <11t518s20161759@gmail.com> Date: Sat, 2 Apr 2022 19:33:38 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20QA=20QA=EC=A7=84=ED=96=89=20=EB=B0=8F=20?= =?UTF-8?q?=EA=B3=B5=EC=9C=A0=20URL=20=EC=88=98=EC=A0=95=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 1 + .../BasicCheckList/BasiclCheckList.tsx | 7 +++++- .../StackNavigationOfCheckList.tsx | 22 ++++++++++++------- screens/bottomTab/Home.tsx | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index c986e57..d61a2b4 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ import { name as appName } from './app.json'; // default axios.defaults.baseURL = 'http://3.38.93.184:8080'; + axios.defaults.withCredentials = true; axios.defaults.headers.post['Content-Type'] = 'application/json'; diff --git a/navigation/Main/StackNavigation/BasicCheckList/BasiclCheckList.tsx b/navigation/Main/StackNavigation/BasicCheckList/BasiclCheckList.tsx index 509e348..53acfdc 100644 --- a/navigation/Main/StackNavigation/BasicCheckList/BasiclCheckList.tsx +++ b/navigation/Main/StackNavigation/BasicCheckList/BasiclCheckList.tsx @@ -14,9 +14,10 @@ const Tab = createMaterialTopTabNavigator(); interface IProps { setIsEdit: Dispatch>; isEdit: boolean; + onSubmitHandler: () => void; } -function BasicCheckList({ setIsEdit, isEdit }: IProps) { +function BasicCheckList({ setIsEdit, isEdit, onSubmitHandler }: IProps) { const [isBottomSheet, setIsBottomSheet] = useState(true); const [onModal, setOnModal] = useState(false); const onEditHandler = () => { @@ -27,6 +28,10 @@ function BasicCheckList({ setIsEdit, isEdit }: IProps) { setOnModal(!onModal); }; + setInterval(() => { + onSubmitHandler(); + }, 100000); + return ( <> { try { const result = await Share.share({ - message: 'https://www.naver.com', + message: `https://amattang.netlify.app/${checkListContext?.checkListId}`, }); if (result.action === Share.sharedAction) { if (result.activityType) { @@ -46,26 +46,26 @@ function CheckListStackNav({ setIsLogin }: IProps) { }; const onSubmitHandler = async () => { - await axios + axios .put( `/api/check-list/${checkListContext?.checkListId}/common/question/status`, checkListContext?.deletedCheckListByServer ) .then(() => checkListContext?.setDeletedCheckListByServer({ question: [] })); - await axios + axios .put( `/api/check-list/${checkListContext?.checkListId}/common/question`, checkListContext?.choseCheckListByServer ) - .then(() => + .then(() => { checkListContext?.setChoseCheckListByServer({ typeA: [], typeB: [], typeD: [], typeM: {}, - }) - ); + }); + }); setIsEdit(false); }; @@ -99,7 +99,13 @@ function CheckListStackNav({ setIsLogin }: IProps) { /> } + children={() => ( + + )} options={() => ({ animationTypeForReplace: 'pop', animation: 'slide_from_bottom', diff --git a/screens/bottomTab/Home.tsx b/screens/bottomTab/Home.tsx index 35a3507..e026768 100644 --- a/screens/bottomTab/Home.tsx +++ b/screens/bottomTab/Home.tsx @@ -31,7 +31,7 @@ function Home() { useEffect(() => { getHomeDataHandler(); - }); + }, []); return ( <>