diff --git a/app/(routes)/Contact/page.tsx b/app/(routes)/Contact/page.tsx
new file mode 100644
index 0000000..51622e8
--- /dev/null
+++ b/app/(routes)/Contact/page.tsx
@@ -0,0 +1,87 @@
+import React from "react";
+import { Button } from "@/components/ui/button";
+import Header from "@/app/_components/Header";
+
+function Contacts() {
+ return (
+ <>
+ {/* Header */}
+
+
+
+
+ {/* Contact Page */}
+
+
+ {/* Background Glow */}
+
+
+
+
+ {/* Page Title */}
+
+
+ Contact Us
+
+
+ Have a question, feedback, or idea? Weβd love to hear from you.
+
+
+
+ {/* Contact Card */}
+
+
+ {/* Left Info */}
+
+
+ Letβs Talk π
+
+
+
+ Reach out for course support, collaboration, or general queries.
+ Our team usually replies within 24 hours.
+
+
+
+
π§ support@yourplatform.com
+
π Available worldwide
+
β° 24/7 Community Support
+
+
+
+ {/* Right Form */}
+
+
+
+
+
+ >
+ );
+}
+
+export default Contacts;
diff --git a/app/(routes)/Projects/page.tsx b/app/(routes)/Projects/page.tsx
new file mode 100644
index 0000000..59d10d9
--- /dev/null
+++ b/app/(routes)/Projects/page.tsx
@@ -0,0 +1,18 @@
+import React from 'react'
+import CourseList from '../courses/_components/CourseList'
+import Header from '@/app/_components/Header'
+
+function Project() {
+ return (
+
+ {/* Header */}
+
+
+
+
+
+
+ )
+}
+
+export default Project
\ No newline at end of file
diff --git a/app/(routes)/courses/[courseId]/_components/CourseChapters.tsx b/app/(routes)/courses/[courseId]/_components/CourseChapters.tsx
index 2d53472..f3076f4 100644
--- a/app/(routes)/courses/[courseId]/_components/CourseChapters.tsx
+++ b/app/(routes)/courses/[courseId]/_components/CourseChapters.tsx
@@ -15,6 +15,7 @@ import {
TooltipTrigger,
} from "@/components/ui/tooltip"
import Link from "next/link";
+import { useAuth } from '@clerk/nextjs'
@@ -25,6 +26,9 @@ type Props = {
function CourseChapters({loading,courseDetail}:Props) {
+ const {has} = useAuth();
+ const hasUnlimitedAccess = has&&has({ plan: 'unlimited' })
+
const EnableExercise = (
chapterIndex: number,
exerciseIndex: number,
diff --git a/app/(routes)/dashboard/_components/UpgradeToPro.tsx b/app/(routes)/dashboard/_components/UpgradeToPro.tsx
index 8845fa2..2d46d2e 100644
--- a/app/(routes)/dashboard/_components/UpgradeToPro.tsx
+++ b/app/(routes)/dashboard/_components/UpgradeToPro.tsx
@@ -1,11 +1,15 @@
+"use client"
import React from 'react'
import Image from "next/image";
import { Button } from '@/components/ui/button';
import Link from "next/link";
+import { useAuth } from '@clerk/nextjs';
function UpgradeToPro() {
- return (
+ const {has} = useAuth();
+ const hasUnlimitedAccess = has&&has({ plan: 'unlimited' })
+ return !hasUnlimitedAccess &&(
Upgrade To Pro
diff --git a/app/(routes)/dashboard/_components/WelcomeBanner.tsx b/app/(routes)/dashboard/_components/WelcomeBanner.tsx
index bec598e..6cfdb92 100644
--- a/app/(routes)/dashboard/_components/WelcomeBanner.tsx
+++ b/app/(routes)/dashboard/_components/WelcomeBanner.tsx
@@ -15,5 +15,4 @@ function WelcomeBanner() {
)
}
-
export default WelcomeBanner
diff --git a/app/(routes)/pricing/page.tsx b/app/(routes)/pricing/page.tsx
new file mode 100644
index 0000000..b68c600
--- /dev/null
+++ b/app/(routes)/pricing/page.tsx
@@ -0,0 +1,48 @@
+import { PricingTable } from "@clerk/nextjs";
+import React from "react";
+import Header from "@/app/_components/Header";
+
+function Pricing() {
+ return (
+
+
+ {/* Header */}
+
+
+
+
+ {/* Pricing Section */}
+
+
+ {/* Gradient background glow */}
+
+
+
+
+ {/* Title */}
+
+
+ Simple Pricing
+
+
+
+ Join for unlimited access to all features, premium tools, and future updates.
+
+
+
+ {/* Pricing Card */}
+
+
+ {/* Footer Note */}
+
+ Cancel anytime Β· Secure payments Β· Instant access
+
+
+
+
+ );
+}
+
+export default Pricing;
diff --git a/app/_components/Exploremoresection.tsx b/app/_components/Exploremoresection.tsx
new file mode 100644
index 0000000..aca570a
--- /dev/null
+++ b/app/_components/Exploremoresection.tsx
@@ -0,0 +1,24 @@
+import React from 'react'
+import CourseList from '../(routes)/courses/_components/CourseList'
+
+function Exploremoresection() {
+ return (
+
+
+ {/* Soft background glow */}
+
+
+
+
+ {/* Section Heading */}
+
+ Explore Our Courses
+
+
+
+
+
+ )
+}
+
+export default Exploremoresection
diff --git a/app/_components/Header.tsx b/app/_components/Header.tsx
index 0b7aff7..d2000a9 100644
--- a/app/_components/Header.tsx
+++ b/app/_components/Header.tsx
@@ -1,6 +1,7 @@
"use client";
-import Image from 'next/image'
-import React from 'react'
+
+import Image from "next/image";
+import React, { useEffect, useState } from "react";
import { Button } from "@/components/ui/button";
import Link from "next/link";
@@ -12,128 +13,108 @@ import {
NavigationMenuList,
NavigationMenuTrigger,
} from "@/components/ui/navigation-menu";
-import { UserButton, useUser } from '@clerk/nextjs';
-
-const courses = [
- {
- id: 1,
- name: 'HTML',
- desc: 'Learn the fundamentals of HTML and build the structure of modern web pages.',
- path: '/course/1/detail'
- },
- {
- id: 2,
- name: 'CSS',
- desc: 'Master CSS to style and design responsive, visually appealing web layouts.',
- path: '/course/2/detail'
- },
- {
- id: 3,
- name: 'React',
- desc: 'Build dynamic and interactive web applications using the React JavaScript library.',
- path: '/course/3/detail'
- },
- {
- id: 4,
- name: 'React Advanced',
- desc: 'Deep dive into advanced React concepts including hooks, state management, performance optimization, and architectural patterns.',
- path: '/course/4/detail'
- },
- {
- id: 5,
- name: 'Python',
- desc: 'Learn Python programming from basics to intermediate level, covering logic building, functions, and real-world applications.',
- path: '/course/5/detail'
- },
- {
- id: 6,
- name: 'Python Advanced',
- desc: 'Master advanced Python concepts such as OOP, modules, APIs, data processing, and automation.',
- path: '/course/6/detail'
- },
- {
- id: 7,
- name: 'Generative AI',
- desc: 'Explore prompt engineering, LLMs, embeddings, image generation, and build GenAI-powered applications.',
- path: '/course/7/detail'
- },
- {
- id: 8,
- name: 'Machine Learning',
- desc: 'Understand ML concepts, algorithms, data preprocessing, model training, evaluation, and deployment.',
- path: '/course/8/detail'
- },
- {
- id: 9,
- name: 'JavaScript',
- desc: 'Learn core JavaScript concepts, asynchronous programming, DOM manipulation, and modern ES6+ features.',
- path: '/course/9/detail'
- }
-];
+import { UserButton, useUser } from "@clerk/nextjs";
+import { useParams } from "next/navigation";
+import axios from "axios";
+import { Course } from "../(routes)/courses/_components/CourseList";
function Header() {
+ const { user } = useUser();
+ const { exerciseSlug } = useParams();
+
+ // β
FIX 1: Course[] (array)
+ const [courses, setCourses] = useState([]);
- const{user}= useUser();
+ useEffect(() => {
+ getCourses();
+ }, []);
+
+ const getCourses = async () => {
+ try {
+ const res = await axios.get("/api/course");
+ setCourses(res.data);
+ } catch (error) {
+ console.error("Failed to fetch courses", error);
+ }
+ };
return (
+ {/* Logo */}
CodeBox
-
-
+ {/* Navbar */}
+ {!exerciseSlug && courses.length > 0 && (
+
+
+ {/* Courses Dropdown */}
+
+ Courses
+
+
+ {courses.map((course) => (
+
+ -
+
{course.title}
+
+ {course.desc}
+
+
+
+ ))}
+
+
+
- {/* Item with dropdown */}
-
- Courses
-
+
-
- {courses.map((course,index)=>(
-
-
{course.name}
-
{course.desc}
-
- ))}
-
+ Projects
+
-
-
+
- {/* Direct link item */}
-
-
- Projects
-
-
-
-
- Pricing
-
-
-
-
- Contact
-
-
+
+
+ Pricing
+
+
-
-
+
+
+ Contact
+
+
+
+
+ )}
- {!user ?
-
-
-
- :
-
-
-
}
+ {/* Auth Section */}
+ {!user ? (
+
+
+
+ ) : (
+
+
+
+
+
+
+ )}
- )
+ );
}
export default Header;
diff --git a/app/_components/Hero.tsx b/app/_components/Hero.tsx
index 651055c..5b6a060 100644
--- a/app/_components/Hero.tsx
+++ b/app/_components/Hero.tsx
@@ -1,24 +1,64 @@
-import React from 'react'
-import Image from 'next/image'
-import { Button } from '@/components/ui/button'
+import React from "react";
+import Image from "next/image";
+import { Button } from "@/components/ui/button";
import Link from "next/link";
+import Exploremoresection from "./Exploremoresection";
function Hero() {
return (
-
-
-
-
Start Your
-
Coding Adventure
-
-
Beginner friendly coding course and Projects
-
-
-
+ <>
+ {/* HERO SECTION */}
+
+
+ {/* Background Image */}
+
+
+ {/* Dark Gradient Overlay */}
+
+
+ {/* Hero Content */}
+
+
+
+ Start Your
+
+
+
+ Coding Adventure
+
+
+
+ Beginner-friendly coding courses, real projects, and game-like learning
+
+
+
+
+
+
+
+ {/* Scroll Hint */}
+
+ β Scroll to explore courses
+
+
+
+ {/* COURSE SECTION */}
+
+
-
- )
+ >
+ );
}
-export default Hero
\ No newline at end of file
+export default Hero;