From f7e80c9c38d679585d2d0dca1e94e0ba71821873 Mon Sep 17 00:00:00 2001 From: Jiwon Chae <63784453+jiwon0226@users.noreply.github.com> Date: Sun, 25 May 2025 22:54:31 +0900 Subject: [PATCH 1/5] =?UTF-8?q?KW-431/feat:=20=ED=95=98=EB=8B=A8=20?= =?UTF-8?q?=ED=83=AD=20=EC=B6=94=EA=B0=80,=20=EC=8A=A4=ED=83=9D=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AppNavigator.js | 166 +++++++++++++++++++++++++++------------------- app.config.js | 2 +- package-lock.json | 120 +++++++++++++-------------------- package.json | 1 + pages/MainPage.js | 4 +- 5 files changed, 147 insertions(+), 146 deletions(-) diff --git a/AppNavigator.js b/AppNavigator.js index 20c285b..68e27e2 100644 --- a/AppNavigator.js +++ b/AppNavigator.js @@ -1,5 +1,6 @@ import { NavigationContainer, DefaultTheme } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; +import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { useState, useEffect } from 'react'; import Ionicons from '@expo/vector-icons/Ionicons'; import { StatusBar } from 'react-native'; @@ -25,6 +26,75 @@ import AccessRequestRolePage from './pages/AccessRequestRolePage'; import { colors } from './constants/colors'; const Stack = createStackNavigator(); +const Tab = createBottomTabNavigator(); + +// Tab 네비게이터 옵션 +const tabScreenOptions = ({ route }) => ({ + tabBarIcon: ({ color, size }) => { + let iconName; + if (route.name === 'MainPage') iconName = 'home-outline'; + else if (route.name === 'MyPageStack') iconName = 'person-outline'; + else if (route.name === 'AccessStack') iconName = 'list-outline'; + else iconName = 'ellipse-outline'; + return ; + }, + tabBarActiveTintColor: colors.secondary, + tabBarInactiveTintColor: 'gray', + headerShown: false, +}); + +// Stack 네비게이터 옵션 +const screenOptions = { + headerStyle: { backgroundColor: colors.secondary, height: 100 }, + headerTintColor: colors.white, + headerTitleStyle: { fontWeight: '600', fontSize: 26 }, + headerTitleAlign: 'center', + gestureEnabled: true, + headerBackImage: () => , + headerBackTitle: '', +}; + +// 마이페이지 스택 네비게이터 +function MyPageStack() { + return ( + + + + + ); +} + +// 출입 권한 스택 네비게이터 +function AccessStack() { + return ( + + + + + + + ); +} export default function AppNavigator() { const { @@ -36,6 +106,7 @@ export default function AppNavigator() { setAccessToken, clearAccessToken, } = useAuthStore(); + const [navState, setNavState] = useState(null); // 앱 시작 시 토큰 유효성 확인 @@ -75,76 +146,35 @@ export default function AppNavigator() { return ( - + ); } diff --git a/app.config.js b/app.config.js index 9b9e9d9..2dc863a 100644 --- a/app.config.js +++ b/app.config.js @@ -26,7 +26,7 @@ export default { }, extra: { //BASE_URL: 'http://keywe.site', // EKS 사용시 - BASE_URL: 'http://192.168.0.111:8081', // 도커 사용시 - 본인 pc IPv4 주소로 수정하세용 + BASE_URL: 'http://192.168.0.17:8081', // 도커 사용시 - 본인 pc IPv4 주소로 수정하세용 }, }, }; diff --git a/package-lock.json b/package-lock.json index d1d6f90..1aba7b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@react-native-async-storage/async-storage": "1.23.1", "@react-native-masked-view/masked-view": "0.3.2", + "@react-navigation/bottom-tabs": "^7.3.13", "@react-navigation/native": "^7.1.6", "@react-navigation/stack": "^7.2.10", "axios": "^1.9.0", @@ -3892,53 +3893,58 @@ } } }, + "node_modules/@react-navigation/bottom-tabs": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@react-navigation/bottom-tabs/-/bottom-tabs-7.3.13.tgz", + "integrity": "sha512-J3MWXBJc3y6hefZNRqdj/JD4nzIDLzZL5GIYj89pR6oRf2Iibz9t1qV7yzxEc1KOaNDkXVZ/5U16PArEJFfykQ==", + "license": "MIT", + "dependencies": { + "@react-navigation/elements": "^2.4.2", + "color": "^4.2.3" + }, + "peerDependencies": { + "@react-navigation/native": "^7.1.9", + "react": ">= 18.2.0", + "react-native": "*", + "react-native-safe-area-context": ">= 4.0.0", + "react-native-screens": ">= 4.0.0" + } + }, "node_modules/@react-navigation/core": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-7.8.5.tgz", - "integrity": "sha512-xDUXs6NI6ASiZgf53I7NPG0iJVGClPL5O3r8ddOCkS6fhVmPRun64m2zxUWnPcxtheFNTFfQ1IXH+gcenTcv/w==", + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-7.9.2.tgz", + "integrity": "sha512-lqCyKMWWaSwGK4VV3wRXXEKvl5IKrVH207Kp77TLCnITnd4KQIdgjzzJ/Pr62ugki3VTAErq1vg0yRlcXciCbg==", "license": "MIT", "dependencies": { - "@react-navigation/routers": "^7.3.5", + "@react-navigation/routers": "^7.3.7", "escape-string-regexp": "^4.0.0", - "nanoid": "3.3.8", + "nanoid": "^3.3.11", "query-string": "^7.1.3", - "react-is": "^18.2.0", - "use-latest-callback": "^0.2.1", - "use-sync-external-store": "^1.2.2" + "react-is": "^19.1.0", + "use-latest-callback": "^0.2.3", + "use-sync-external-store": "^1.5.0" }, "peerDependencies": { "react": ">= 18.2.0" } }, - "node_modules/@react-navigation/core/node_modules/nanoid": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", - "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } + "node_modules/@react-navigation/core/node_modules/react-is": { + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.1.0.tgz", + "integrity": "sha512-Oe56aUPnkHyyDxxkvqtd7KkdQP5uIUfHxd5XTb3wE9d/kRnZLmKbDB0GWk919tdQ+mxxPtG6EAs6RMT6i1qtHg==", + "license": "MIT" }, "node_modules/@react-navigation/elements": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-2.3.8.tgz", - "integrity": "sha512-2ZVBtPfrkmOxzvIyDu3fPZ6aS4HcXL+TvzPDGa1znY2OP1Llo6wH14AmJHQFDquiInp2656hRMM1BkfJ3yPwew==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-2.4.2.tgz", + "integrity": "sha512-cudKLsRtOB+i8iDzfBKypdqiHsDy1ruqCfYAtwKEclDmLsxu3/90YXoBtoPyFNyIpsn3GtsJzZsrYWQh78xSWg==", "license": "MIT", "dependencies": { "color": "^4.2.3" }, "peerDependencies": { "@react-native-masked-view/masked-view": ">= 0.2.0", - "@react-navigation/native": "^7.1.6", + "@react-navigation/native": "^7.1.9", "react": ">= 18.2.0", "react-native": "*", "react-native-safe-area-context": ">= 4.0.0" @@ -3950,65 +3956,29 @@ } }, "node_modules/@react-navigation/native": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-7.1.6.tgz", - "integrity": "sha512-XcfygfHDfAgf2iC4rNBc67Yy0M1aYRGNeNKqja5AJPFZoBQhAEAxKCwHsH4g3qU0zIbzLCthoSl5107dBjoeZw==", + "version": "7.1.9", + "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-7.1.9.tgz", + "integrity": "sha512-/A0oBwZIeD23o4jsnB0fEyKmKS+l4LAbJP/ioVvsGEubGp+sc5ouQNranOh7JwR0R1eX0MjcsLKprEwB+nztdw==", "license": "MIT", "dependencies": { - "@react-navigation/core": "^7.8.5", + "@react-navigation/core": "^7.9.2", "escape-string-regexp": "^4.0.0", "fast-deep-equal": "^3.1.3", - "nanoid": "3.3.8", - "use-latest-callback": "^0.2.1" + "nanoid": "^3.3.11", + "use-latest-callback": "^0.2.3" }, "peerDependencies": { "react": ">= 18.2.0", "react-native": "*" } }, - "node_modules/@react-navigation/native/node_modules/nanoid": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", - "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/@react-navigation/routers": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-7.3.5.tgz", - "integrity": "sha512-SBh/3G7pURIQfIwG4OnAfLvq0E4+l1Ii6577z22cIhWIrTOHFXg0rMxC7ft/amzxYn+iG2nYa4dONRd+xIs+yg==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-7.3.7.tgz", + "integrity": "sha512-5ffgrefOs2zWqcCVX+OKn+RDx0puopQtxqetegFrTfWQ6pGXdY/5v4kBpPwaOFrNEeE/LPbHt9IJaJuvyhB7RA==", "license": "MIT", "dependencies": { - "nanoid": "3.3.8" - } - }, - "node_modules/@react-navigation/routers/node_modules/nanoid": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", - "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "nanoid": "^3.3.11" } }, "node_modules/@react-navigation/stack": { diff --git a/package.json b/package.json index 8102387..aa1153c 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "@react-native-async-storage/async-storage": "1.23.1", "@react-native-masked-view/masked-view": "0.3.2", + "@react-navigation/bottom-tabs": "^7.3.13", "@react-navigation/native": "^7.1.6", "@react-navigation/stack": "^7.2.10", "axios": "^1.9.0", diff --git a/pages/MainPage.js b/pages/MainPage.js index 75e4f3a..5c4d2d4 100644 --- a/pages/MainPage.js +++ b/pages/MainPage.js @@ -131,10 +131,10 @@ const MainPage = () => { userVC={userVC} initialIndex={initialIndex >= 0 ? initialIndex : 0} // 처음 보여줄 카드 인덱스 /> - + {/* - + */} ); }; From a4c61ec08f8332a3ff92f64b5a31d4e3b3ee6df5 Mon Sep 17 00:00:00 2001 From: Jiwon Chae <63784453+jiwon0226@users.noreply.github.com> Date: Mon, 26 May 2025 11:18:43 +0900 Subject: [PATCH 2/5] =?UTF-8?q?KW-431/feat:=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20=EB=B9=84=EB=B0=80?= =?UTF-8?q?=EB=B2=88=ED=98=B8=20=EB=B3=80=EA=B2=BD=20=EB=AA=A8=EB=8B=AC=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC=20=EB=B0=8F=20isverified=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AppNavigator.js | 2 + app.config.js | 2 +- components/headers/WaveHeader.js | 9 +++- modals/PasswordConfirmModal.js | 11 ++--- pages/MyPage.js | 77 ++++++++++++++++++++------------ stores/modalStore.js | 8 ++++ 6 files changed, 73 insertions(+), 36 deletions(-) create mode 100644 stores/modalStore.js diff --git a/AppNavigator.js b/AppNavigator.js index 68e27e2..bce5266 100644 --- a/AppNavigator.js +++ b/AppNavigator.js @@ -8,6 +8,7 @@ import HomeButtonController from './components/buttons/HomeButtonController'; import LoadingOverlay from './components/loadings/LoadingOverlay'; import { getMyInfo } from './apis/MyPageApi'; import { useAuthStore } from './stores/authStore'; +import PasswordConfirmModal from './modals/PasswordConfirmModal'; // 로그인 전 페이지 import WelcomePage from './pages/WelcomePage'; @@ -149,6 +150,7 @@ export default function AppNavigator() {