import { useEffect } from "react"; import { useRouter } from "next/router"; import Link from "next/link"; import Image from "next/image"; import Head from "next/head"; import { getPricingDisplay, getIntroOfferNotice } from "../utils/pricing"; import { getCurrentUser, isAdmin } from "../lib/supabaseClient"; export default function Home() { const router = useRouter(); const pricing = getPricingDisplay(); const introNotice = getIntroOfferNotice(); // Check if user just authenticated via magic link and is an admin // Check if user just logged in (from OAuth or magic link) and is admin useEffect(() => { const checkAdminRedirect = async () => { // Only check if there's an auth hash fragment (from OAuth/magic link callback) // The hash will contain access_token or other auth parameters if (typeof window !== "undefined" && window.location.hash.includes("access_token")) { const user = await getCurrentUser(); if (user) { const hasAdminAccess = await isAdmin(user); if (hasAdminAccess) { // Redirect admin users to admin dashboard router.push("/admin"); } } } }; checkAdminRedirect(); // Only run once on mount - dependencies intentionally omitted to avoid re-runs // eslint-disable-next-line react-hooks/exhaustive-deps }, []); // No automatic redirects - users should land on the page they requested // Authentication state is handled by the auth system return ( <> iiskills.cloud - Indian Institute of Professional Skills Development
{/* Hero Section */}

iiskills.cloud

Indian Institute of Professional Skills Development

Education for All, Online and Affordable

Explore Courses Learn About Certification
Students learning together on iiskills.cloud platform
{/* Core Purpose & Vision Section */}

Our Vision for Viksit Bharat

{/* Featured Student Image */}
Empowered student ready to learn and succeed

🇮🇳 Building a Developed India

We are committed to the vision of Viksit Bharat (Developed India) by empowering every Indian citizen with the skills needed for personal and professional growth. Our mission is to bridge the skill gap and create opportunities for all.

🎯 Skill Enhancement Mission

We believe in democratizing education and making quality skill development accessible to everyone. Every course is designed to provide{" "} immediately applicable professional and personal skills that transform careers and lives.

🌟 Opportunity for All

Every Indian deserves the opportunity to upgrade their abilities and unlock their potential. We provide pathways to success regardless of background, location, or economic status.

💪 Empowerment Through Learning

Knowledge is power. By equipping individuals with modern skills and competencies, we enable them to compete globally, contribute to India's development, and achieve their dreams.

{/* Key Value Proposition Section */}
{/* Introductory Offer Banner */} {introNotice && (

{introNotice}

)}

Why Choose iiskills.cloud?

Quality education that's accessible to everyone

Confident learner ready to transform their future
{/* Affordability */}
💰

Unbeatable Affordability

{pricing.basePrice}
+ {pricing.gstRate} GST ({pricing.gstAmount})
= {pricing.totalPrice}
Per Course
{pricing.isIntroductory && (

🎉 Introductory Offer!

Valid till Feb 14, 2026. New fees effective from midnight of Feb 15, 2026 (₹352.82)

)}

Premium quality courses at a price anyone in India can afford. No hidden fees, no subscriptions.

{/* Accessibility */}
🌐

Truly Accessible

  • 100% Online: Learn from anywhere, anytime
  • Basic English: Simple language, easy to understand
  • Local Languages: Use browser translation for your language
  • Mobile Friendly: Learn on any device
{/* Practical Skills */}
🚀

Immediately Applicable

Every course focuses on practical, real-world skills you can use right away:

  • • Professional communication
  • • Digital marketing & tech skills
  • • Leadership & management
  • • Personal development
  • • Career advancement tools
{/* Featured Courses Preview */}

Featured Courses

Start your learning journey today - Many FREE courses available!

Learn AI

Discover Artificial Intelligence fundamentals and practical applications.

⏱️ 10 weeks

🎁 Free Sample Module

View Details
FREE

Learn Aptitude

Develop logical reasoning, quantitative aptitude, and analytical skills for competitive exams.

⏱️ 10 weeks
Start Free Course

Learn PR

Master Public Relations strategies, media management, and brand building.

⏱️ 10 weeks

🎁 Free Sample Module

View Details
Browse All Courses →

10 courses available now. 50+ courses being developed!

{/* Call to Action */}

Ready to Transform Your Future?

Join thousands of learners building skills for tomorrow

Get Started Now Learn More About Us
Diverse community of learners achieving success together
); }