import React, { useState } from 'react';
import { ShoppingCart, User, Book, Phone, Mail, Award, TrendingUp } from 'lucide-react';
const coursesData = [
{
id: 1,
title: 'IIT JEE Mathematics',
description: 'Specialized coaching for IIT Mains and Advanced, covering all essential topics for success in competitive exams.',
price: 500,
},
{
id: 2,
title: 'Class 9-12 Mathematics',
description: 'Comprehensive curriculum-based tuition for students in grades 9 through 12, focusing on building strong foundational skills.',
price: 500,
},
];
const App = () => {
const [activePage, setActivePage] = useState('home');
const [cart, setCart] = useState([]);
const [showModal, setShowModal] = useState(false);
const [showCart, setShowCart] = useState(false);
const addToCart = (course) => {
const existingCourse = cart.find(item => item.id === course.id);
if (existingCourse) {
setCart(cart.map(item =>
item.id === course.id ? { ...item, quantity: item.quantity + 1 } : item
));
} else {
setCart([...cart, { ...course, quantity: 1 }]);
}
setShowCart(true);
};
const removeFromCart = (courseId) => {
setCart(cart.filter(item => item.id !== courseId));
};
const totalAmount = cart.reduce((total, item) => total + item.price * item.quantity, 0);
const handleCheckout = () => {
setShowModal(true);
};
const renderPage = () => {
switch (activePage) {
case 'home':
return
Expert tuition for 9th to 12th grade students across India.
Our specialized approach for IIT JEE has a track record of success.
Trusted Consultancy Services for You