Skip to content

Commit

Permalink
feat: add config option for skip onboarding (#1026)
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce McMath <[email protected]>
  • Loading branch information
bryce-mcmath authored Nov 14, 2023
1 parent 046df75 commit e952d7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/legacy/core/App/contexts/configuration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export interface ConfigurationContext {
enableImplicitInvitations?: boolean
enableReuseConnections?: boolean
showPreface?: boolean
disableOnboardingSkip?: boolean
}

export const ConfigurationContext = createContext<ConfigurationContext>(null as unknown as ConfigurationContext)
Expand Down
1 change: 1 addition & 0 deletions packages/legacy/core/App/defaultConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ export const defaultConfiguration: ConfigurationContext = {
enableTours: false,
supportedLanguages: Object.keys(translationResources) as Locales[],
showPreface: false,
disableOnboardingSkip: false,
}
2 changes: 2 additions & 0 deletions packages/legacy/core/App/navigators/RootStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const RootStack: React.FC = () => {
showPreface,
enableImplicitInvitations,
enableReuseConnections,
disableOnboardingSkip,
} = useConfiguration()
useDeepLinks()

Expand Down Expand Up @@ -310,6 +311,7 @@ const RootStack: React.FC = () => {
nextButtonText={t('Global.Next')}
previousButtonText={t('Global.Back')}
pages={pages(onTutorialCompleted, OnboardingTheme)}
disableSkip={disableOnboardingSkip}
style={carousel}
/>
)}
Expand Down

0 comments on commit e952d7c

Please sign in to comment.