-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create screen to offer tutorial to new users
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import { Text, View } from 'react-native'; | ||
import { DefaultButton } from '../../../components/atoms/DefaultButton'; | ||
import { WalkthroughStepsContext } from '../../../store/contexts/walkthroughStepsContext'; | ||
|
||
export default function WalkthroughTutorial({ navigation }) { | ||
|
||
const { setWalkthroughStep } = useContext(WalkthroughStepsContext); | ||
|
||
const handleContinue = (shouldRenderTutorial) => { | ||
if (shouldRenderTutorial) setWalkthroughStep(1) | ||
|
||
navigation.navigate('login') | ||
} | ||
|
||
return ( | ||
<View className='px-4 py-4 flex h-full justify-center'> | ||
<Text className='font-ms-semibold text-2xl text-center mt-auto mb-[55%]'>Deseja fazer um tutorial inicial?</Text> | ||
<View className='pb-8'> | ||
<DefaultButton title='Sim' onPress={handleContinue(true)}/> | ||
<DefaultButton title='Pular tutorial' variant='transparent' onPress={handleContinue(false)}/> | ||
</View> | ||
</View> | ||
); | ||
} |