'use client' import React, { useState } from 'react' import { useRouter } from 'next/navigation' import { Code, Users, Clock, ArrowRight } from 'lucide-react' export default function ExamLandingPage() { const router = useRouter() const [examCode, setExamCode] = useState('') const joinExam = () => { if (examCode.trim()) { router.push(`/coding/exam/${examCode.trim().toUpperCase()}`) } else { alert('Please enter a valid exam code') } } const handleKeyPress = (e: React.KeyboardEvent) => { if (e.key === 'Enter') { joinExam() } } return (
{/* Header */}

OpenLearnX Coding Exams

Join a coding exam with your exam code

{/* Main Content */}
{/* Join Exam Section */}

Join Coding Exam

Enter your 6-character exam code to start

setExamCode(e.target.value.toUpperCase())} onKeyPress={handleKeyPress} placeholder="Enter exam code (e.g. ABC123)" className="flex-1 p-4 bg-gray-700 border border-gray-600 rounded-lg text-center text-xl font-mono tracking-widest text-white placeholder-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500" maxLength={6} />
{/* Info Cards */}

Multi-User

Compete with other students in real-time coding challenges

Timed Exams

Complete coding problems within the allocated time limit

Multi-Language

Code in Python, Java, JavaScript, C++, and more

{/* Instructions */}

How to Join an Exam

1

Get your 6-character exam code from your instructor

2

Enter the exam code in the field above and click "Join"

3

Wait for the instructor to start the exam

4

Code your solution and submit before time runs out

) }