|
1 | 1 | import React from 'react'; |
2 | | -import { |
3 | | - OnboardingProvider, |
4 | | - useOnboarding, |
5 | | -} from '@/contexts/OnboardingContext'; |
| 2 | +import { OnboardingProvider } from '@/contexts/OnboardingContext'; |
| 3 | +import { OnboardingStep as OnboardingStepType } from '@/contexts/OnboardingContextDefinition'; |
| 4 | +import { useOnboarding } from '@/hooks/useOnboarding'; |
6 | 5 | import { getOnboardingStepsForPage } from '@/constants/OnboardingSteps'; |
7 | 6 |
|
8 | 7 | interface OnboardingProps { |
9 | 8 | children: React.ReactNode; |
10 | 9 | pageType?: 'homepage' | 'try' | 'about' | 'news'; |
11 | 10 | showProgressIndicator?: boolean; |
12 | | - customSteps?: any[]; |
| 11 | + customSteps?: OnboardingStepType[]; |
13 | 12 | } |
14 | 13 |
|
15 | 14 | export const Onboarding: React.FC<OnboardingProps> = ({ |
@@ -72,34 +71,6 @@ const OnboardingContent: React.FC<{ |
72 | 71 |
|
73 | 72 | // useOnboarding hook is imported above |
74 | 73 |
|
75 | | -// Add data attributes to elements for targeting |
76 | | -export const addOnboardingIds = { |
77 | | - sugarLabsLogo: () => ({ |
78 | | - 'data-onboarding-id': 'sugar-labs-logo', |
79 | | - className: 'sugar-labs-logo', |
80 | | - }), |
81 | | - mainNavigation: () => ({ |
82 | | - 'data-onboarding-id': 'main-navigation', |
83 | | - className: 'main-navigation', |
84 | | - }), |
85 | | - trySugarButton: () => ({ |
86 | | - 'data-onboarding-id': 'try-sugar-button', |
87 | | - className: 'try-sugar-button', |
88 | | - }), |
89 | | - activitiesSection: () => ({ |
90 | | - 'data-onboarding-id': 'activities-section', |
91 | | - className: 'activities-section', |
92 | | - }), |
93 | | - statsSection: () => ({ |
94 | | - 'data-onboarding-id': 'stats-section', |
95 | | - className: 'stats-section', |
96 | | - }), |
97 | | - donationSection: () => ({ |
98 | | - 'data-onboarding-id': 'donation-section', |
99 | | - className: 'donation-section', |
100 | | - }), |
101 | | -}; |
102 | | - |
103 | 74 | // Component to add onboarding trigger button |
104 | 75 | export const OnboardingTrigger: React.FC<{ |
105 | 76 | className?: string; |
|
0 commit comments