parent
bc2d9bb842
commit
a0bab787de
@ -0,0 +1,34 @@ |
||||
import type { OnboardingState } from '@/types/onboarding'; |
||||
|
||||
export const initialState: OnboardingState = { |
||||
currentStep: 0, |
||||
totalSteps: 2, |
||||
userProfile: {}, |
||||
connectedAccounts: [ |
||||
{ |
||||
id: 'linkedin', |
||||
type: 'linkedin', |
||||
name: 'LinkedIn', |
||||
isConnected: false, |
||||
}, |
||||
{ |
||||
id: 'contacts', |
||||
type: 'contacts', |
||||
name: 'Contacts', |
||||
isConnected: false, |
||||
}, |
||||
{ |
||||
id: 'google', |
||||
type: 'google', |
||||
name: 'Google', |
||||
isConnected: false, |
||||
}, |
||||
{ |
||||
id: 'apple', |
||||
type: 'apple', |
||||
name: 'Apple', |
||||
isConnected: false, |
||||
}, |
||||
], |
||||
isComplete: false, |
||||
}; |
@ -0,0 +1,4 @@ |
||||
import { createContext } from 'react'; |
||||
import type { OnboardingContextType } from '@/types/onboarding'; |
||||
|
||||
export const OnboardingContext = createContext<OnboardingContextType | undefined>(undefined); |
@ -0,0 +1,10 @@ |
||||
import { useContext } from 'react'; |
||||
import { OnboardingContext } from '@/contexts/OnboardingContextType'; |
||||
|
||||
export const useOnboarding = () => { |
||||
const context = useContext(OnboardingContext); |
||||
if (context === undefined) { |
||||
throw new Error('useOnboarding must be used within an OnboardingProvider'); |
||||
} |
||||
return context; |
||||
}; |
@ -1,12 +1,12 @@ |
||||
export interface NextGraphSession { |
||||
ng?: any; |
||||
ng?: unknown; |
||||
privateStoreId?: string; |
||||
[key: string]: any; |
||||
[key: string]: unknown; |
||||
} |
||||
|
||||
export interface NextGraphAuth { |
||||
session?: NextGraphSession; |
||||
login?: () => void; |
||||
logout?: () => void; |
||||
[key: string]: any; |
||||
[key: string]: unknown; |
||||
} |
Loading…
Reference in new issue