From ae9cb017ecbcb4031422e440ac9b18446537e659 Mon Sep 17 00:00:00 2001 From: potados99 Date: Wed, 29 Sep 2021 01:33:38 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20booking=EC=AA=BD=EB=8F=84=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=9A=94=EA=B5=AC=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=ED=99=94=EB=A9=B4=EC=9D=80=20NeedLogin=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=A6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/presentation/features/booking/BookingScreen.tsx | 12 ++++++------ .../booking/{Onboarding => NeedLogin}/index.tsx | 6 +++--- .../features/membership/MembershipScreen.tsx | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) rename src/presentation/features/booking/{Onboarding => NeedLogin}/index.tsx (96%) diff --git a/src/presentation/features/booking/BookingScreen.tsx b/src/presentation/features/booking/BookingScreen.tsx index b5422b3..89ad349 100644 --- a/src/presentation/features/booking/BookingScreen.tsx +++ b/src/presentation/features/booking/BookingScreen.tsx @@ -21,7 +21,7 @@ import React from 'react'; import History from './History'; import Complete from './Complete'; import {observer} from 'mobx-react'; -import Onboarding from './Onboarding'; +import NeedLogin from './NeedLogin'; import OptionsList from './OptionsList'; import useUserState from '../../hooks/useUserState'; import OptionsDetail from './OptionsDetail'; @@ -33,7 +33,7 @@ import {createStackNavigator} from '@react-navigation/stack'; import BookingInfoHeaderButton from './History/BookingInfoHeaderButton'; export type BookingNavigationParams = { - BookingOnboarding: undefined; + BookingNeedLogin: undefined; BookingStudentLogin: undefined; BookingGuestLogin: undefined; @@ -52,11 +52,11 @@ function BookingScreen() { * 로그인 유도하는 화면. * 전체화면으로 보여줄거라서 헤더는 숨김. */ - const onboarding = ( + const needLogin = ( ); @@ -145,7 +145,7 @@ function BookingScreen() { return ( - {isLoggedIn ? [history, list, detail, complete] : [onboarding, studentLogin, guestLogin]} + {isLoggedIn ? [history, list, detail, complete] : [needLogin, studentLogin, guestLogin]} ); } diff --git a/src/presentation/features/booking/Onboarding/index.tsx b/src/presentation/features/booking/NeedLogin/index.tsx similarity index 96% rename from src/presentation/features/booking/Onboarding/index.tsx rename to src/presentation/features/booking/NeedLogin/index.tsx index def41d9..5e83cab 100644 --- a/src/presentation/features/booking/Onboarding/index.tsx +++ b/src/presentation/features/booking/NeedLogin/index.tsx @@ -29,10 +29,10 @@ import {StyleSheet, Text, View} from 'react-native'; import {BookingNavigationParams} from '../BookingScreen'; type Props = { - navigation: StackNavigationProp; + navigation: StackNavigationProp; }; -function Onboarding({navigation}: Props) { +function NeedLogin({navigation}: Props) { const {isTryingRememberedLogin} = useUserState(); const goStudentLogin = () => navigation.navigate('BookingStudentLogin'); @@ -67,7 +67,7 @@ function Onboarding({navigation}: Props) { return isTryingRememberedLogin ? loadingView : onboardingContents; } -export default observer(Onboarding); +export default observer(NeedLogin); const styles = StyleSheet.create({ container: { diff --git a/src/presentation/features/membership/MembershipScreen.tsx b/src/presentation/features/membership/MembershipScreen.tsx index 6ae07b9..568eda5 100644 --- a/src/presentation/features/membership/MembershipScreen.tsx +++ b/src/presentation/features/membership/MembershipScreen.tsx @@ -38,7 +38,7 @@ function MembershipScreen() { const Stack = createStackNavigator(); - const needLoginScreen = ( + const needLogin = ( ); - const loginScreen = ( + const studentLogin = ( ); - const barcodeScreen = ( + const barcode = ( - {isLoggedInAsStudent ? [barcodeScreen] : [needLoginScreen, loginScreen]} + {isLoggedInAsStudent ? [barcode] : [needLogin, studentLogin]} ); }