Skip to content

Commit 88794d7

Browse files
committed
Fix
1 parent a31a8d2 commit 88794d7

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/navigation/InitNavigator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {createAppContainer, createSwitchNavigator} from 'react-navigation';
22

33
import SplashScreen from '../screens/Splash';
4-
import IntroScreen from '../screens/Intro';
4+
import OnBoardingScreen from '../screens/OnBoarding';
55
import AppNavigator from './AppNavigator';
66

77
const InitialNavigator = createSwitchNavigator({
88
Splash: SplashScreen,
9-
Intro: IntroScreen,
9+
OnBoarding: OnBoardingScreen,
1010
App: AppNavigator,
1111
});
1212

src/screens/Intro.js renamed to src/screens/OnBoarding.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const slides = [
2828
},
2929
];
3030

31-
export default function Intro(props) {
31+
export default function OnBoarding(props) {
3232
const {navigation} = props;
3333
const {navigate} = navigation;
3434

src/screens/Splash.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function SplashScreen(props) {
88
const {navigate} = navigation;
99

1010
const showContext = useContext(CTX);
11-
const {intro} = showContext;
11+
const {onBoarding} = showContext;
1212

1313
useEffect(() => {
1414
const timer = setTimeout(() => {
@@ -18,12 +18,12 @@ export default function SplashScreen(props) {
1818
});
1919

2020
function _bootstrapAsync() {
21-
navigate(intro ? 'App' : 'Intro');
21+
navigate(onBoarding ? 'App' : 'OnBoarding');
2222
}
2323

2424
return (
2525
<View style={styles.container}>
26-
<Text style={styles.title}>👻Dating</Text>
26+
<Text style={styles.title}>👻 Social Network</Text>
2727
</View>
2828
);
2929
}

src/tools/context/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ export {CTX};
77

88
export default function Store(props) {
99
const [token, setToken] = useState(null);
10-
const [intro, setIntro] = useState(null);
10+
const [onBoarding, setOnBoarding] = useState(null);
1111

1212
useEffect(() => {
1313
_bootstrapAsync();
1414
});
1515

1616
const _bootstrapAsync = async () => {
1717
const userToken = await AsyncStorage.getItem('userToken');
18-
const userIntro = await AsyncStorage.getItem('userIntro');
18+
const userOnBoarding = await AsyncStorage.getItem('userOnBoarding');
1919
setToken(userToken);
20-
setIntro(userIntro);
20+
setOnBoarding(userOnBoarding);
2121
};
2222

2323
const _authenticate = async accessToken => {
@@ -30,11 +30,11 @@ export default function Store(props) {
3030
};
3131

3232
const _seen = async () => {
33-
await AsyncStorage.setItem('userIntro', 'done');
33+
await AsyncStorage.setItem('userOnBoarding', 'done');
3434
};
3535

3636
return (
37-
<CTX.Provider value={{token, _authenticate, _logout, intro, _seen}}>
37+
<CTX.Provider value={{token, _authenticate, _logout, onBoarding, _seen}}>
3838
{props.children}
3939
</CTX.Provider>
4040
);

0 commit comments

Comments
 (0)