import React, { useState } from 'react'; import { View, Text, StyleSheet, ScrollView, TouchableOpacity, Dimensions, } from 'react-native'; import { useRouter } from 'expo-router'; import { Colors } from '../../constants/Colors'; import Header from '../../components/navigation/Header'; const { width } = Dimensions.get('window'); export default function TutorialScreen() { const router = useRouter(); const [currentStep, setCurrentStep] = useState(0); const steps = [ { title: 'Share Your Projects', description: 'Upload screenshots, code snippets, and demos of your GitHub projects', icon: '📱', }, { title: 'Connect with Developers', description: 'Follow other developers, comment on projects, and build your network', icon: '💬', }, { title: 'Discover New Projects', description: 'Explore trending projects, search by hashtags, and find inspiration', icon: '🔍', }, { title: 'Create Reels', description: 'Share short video demos of your projects in action', icon: '🎬', }, ]; const handleNext = () => { if (currentStep < steps.length - 1) { setCurrentStep(currentStep + 1); } else { router.push('/(tabs)/home'); } }; const handleSkip = () => { router.push('/(tabs)/home'); }; return (
{ const index = Math.round(e.nativeEvent.contentOffset.x / width); setCurrentStep(index); }} > {steps.map((step, index) => ( {step.icon} {step.title} {step.description} ))} {steps.map((_, index) => ( ))} {currentStep === steps.length - 1 ? 'Get Started' : 'Next'} ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: Colors.background, }, content: { flex: 1, }, stepContainer: { width, justifyContent: 'center', alignItems: 'center', padding: 20, }, stepContent: { alignItems: 'center', maxWidth: 300, }, stepIcon: { fontSize: 80, marginBottom: 30, }, stepTitle: { fontSize: 24, fontWeight: 'bold', color: Colors.text, marginBottom: 16, textAlign: 'center', }, stepDescription: { fontSize: 16, color: Colors.textSecondary, textAlign: 'center', lineHeight: 24, }, footer: { padding: 20, borderTopWidth: 1, borderTopColor: Colors.border, }, dots: { flexDirection: 'row', justifyContent: 'center', gap: 8, marginBottom: 20, }, dot: { width: 8, height: 8, borderRadius: 4, backgroundColor: Colors.border, }, activeDot: { backgroundColor: Colors.accent, width: 24, }, nextButton: { backgroundColor: Colors.accent, borderRadius: 8, padding: 16, alignItems: 'center', }, nextButtonText: { color: Colors.text, fontSize: 16, fontWeight: '600', }, });