'use client' import { motion } from 'framer-motion' import { useState } from 'react' import Link from 'next/link' import Navigation from '@/components/Navigation' import Footer from '@/components/Footer' export default function LernpfadFinder() { const [currentStep, setCurrentStep] = useState(0) const [answers, setAnswers] = useState>({}) const [recommendation, setRecommendation] = useState(null) const [showContactForm, setShowContactForm] = useState(false) const [contactData, setContactData] = useState({ name: '', email: '', message: '', }) const questions = [ { question: 'Was ist Ihr Hauptziel?', options: [ { text: 'Karrierewechsel in die IT', value: 'career' }, { text: 'IT-Kenntnisse für meinen aktuellen Job', value: 'current' }, { text: 'Persönliches Interesse an IT', value: 'interest' }, { text: 'Gründung eines IT-Unternehmens', value: 'startup' }, ], }, { question: 'Welcher Bereich interessiert Sie am meisten?', options: [ { text: 'Programmierung & Softwareentwicklung', value: 'programming' }, { text: 'IT-Sicherheit & Cybersecurity', value: 'security' }, { text: 'Systemadministration & Netzwerke', value: 'admin' }, { text: 'Webentwicklung', value: 'web' }, { text: 'Noch unsicher', value: 'unsure' }, ], }, { question: 'Wie viel Zeit können Sie pro Woche investieren?', options: [ { text: 'Weniger als 5 Stunden', value: 'low' }, { text: '5-10 Stunden', value: 'medium' }, { text: '10-20 Stunden', value: 'high' }, { text: 'Mehr als 20 Stunden', value: 'very-high' }, ], }, { question: 'Haben Sie bereits IT-Vorkenntnisse?', options: [ { text: 'Keine Vorkenntnisse', value: 'none' }, { text: 'Grundkenntnisse (Computer, Internet)', value: 'basic' }, { text: 'Einige Erfahrung mit IT', value: 'some' }, { text: 'Fortgeschrittene Kenntnisse', value: 'advanced' }, ], }, ] const handleAnswer = (value: string) => { setAnswers({ ...answers, [currentStep]: value }) if (currentStep < questions.length - 1) { setCurrentStep(currentStep + 1) } else { calculateRecommendation() } } const calculateRecommendation = () => { const goal = answers[0] const interest = answers[1] const time = answers[2] const experience = answers[3] let recommendedCourse = 'IT-Grundlagen für Einsteiger' if (experience === 'none' || experience === 'basic') { recommendedCourse = 'IT-Grundlagen für Einsteiger' } else if (interest === 'programming') { recommendedCourse = 'Python für Anfänger' } else if (interest === 'web') { recommendedCourse = 'Webentwicklung für Einsteiger' } else if (interest === 'security') { recommendedCourse = 'IT-Security Grundlagen' } else if (interest === 'admin') { recommendedCourse = 'Linux für Anfänger' } setRecommendation(recommendedCourse) } const resetQuiz = () => { setCurrentStep(0) setAnswers({}) setRecommendation(null) } return ( <>

Lernpfad-Finder

Finden Sie den passenden Kurs für Ihren Einstieg

Ihr persönlicher Lernpfad

Beantworten Sie ein paar Fragen und wir empfehlen Ihnen den passenden Kurs für Ihren Einstieg in die IT.

{!recommendation ? ( <> {/* Progress Bar */}
Frage {currentStep + 1} von {questions.length} {Math.round(((currentStep + 1) / questions.length) * 100)}%
{/* Current Question */}

{questions[currentStep].question}

{questions[currentStep].options.map((option) => ( ))}
{currentStep > 0 && ( )}
) : (

Ihre Empfehlung

{recommendation}

Basierend auf Ihren Antworten empfehlen wir Ihnen diesen Kurs als Einstieg. Dieser Kurs ist speziell für Quereinsteiger konzipiert und führt Sie Schritt für Schritt in die IT-Welt ein.

{!showContactForm ? ( <>

Möchten Sie diesen Lernpfad per E-Mail erhalten? Füllen Sie das Kontaktformular aus und wir senden Ihnen die Empfehlung zu.

Zum Kurskatalog
) : (

Kontaktformular

{ e.preventDefault() const subject = `Lernpfad-Empfehlung: ${recommendation}` const body = `Hallo,\n\nich habe den Lernpfad-Finder ausgefüllt und folgende Empfehlung erhalten:\n\n${recommendation}\n\nMeine Antworten:\n${Object.entries(answers).map(([key, value]) => { const question = questions[parseInt(key)] const option = question?.options.find(opt => opt.value === value) return `Frage ${parseInt(key) + 1}: ${option?.text || value}` }).join('\n')}\n\n${contactData.message ? `Nachricht:\n${contactData.message}` : ''}` window.location.href = `mailto:info@doing-it.de?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}` }} >
setContactData({ ...contactData, name: e.target.value })} placeholder="Ihr Name" />
setContactData({ ...contactData, email: e.target.value })} placeholder="ihre.email@beispiel.de" />