diff --git a/package-lock.json b/package-lock.json index e957a08..8c2f9a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4427,7 +4427,6 @@ "integrity": "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.0.2" } @@ -4438,7 +4437,6 @@ "integrity": "sha512-4hOiT/dwO8Ko0gV1m/TJZYk3y0KBnY9vzDh7W+DH17b2HFSOGgdj33dhihPeuy3l0q23+4e+hoXHV6hCC4dCXw==", "devOptional": true, "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.0.0" } @@ -4505,7 +4503,6 @@ "integrity": "sha512-4O3idHxhyzjClSMJ0a29AcoK0+YwnEqzI6oz3vlRf3xw0zbzt15MzXwItOlnr5nIth6zlY2RENLsOPvhyrKAQA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.34.1", "@typescript-eslint/types": "8.34.1", @@ -5022,7 +5019,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -5449,7 +5445,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001718", "electron-to-chromium": "^1.5.160", @@ -6127,7 +6122,6 @@ "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -6301,7 +6295,6 @@ "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.8", @@ -8885,7 +8878,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -9078,7 +9070,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -9088,7 +9079,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz", "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.26.0" }, @@ -9939,7 +9929,6 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -10105,7 +10094,6 @@ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index 8053482..bfeb2f6 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -3,12 +3,11 @@ import React, { useState, useRef } from 'react'; import { Star, Clock, Filter } from 'lucide-react'; import { useRouter } from 'next/navigation'; import { NavbarDemo } from "@/components/nav"; -import { AnimatePresence } from 'framer-motion'; -import AcademicHubSkeleton from '@/components/skeletons/dashboardPageSkeleton'; +import { AnimatePresence } from "framer-motion"; +import AcademicHubSkeleton from "@/components/skeletons/dashboardPageSkeleton"; +import { MOCK_PROJECTS } from "@/data/mockProjects"; import Image from 'next/image'; -import Footer from '@/components/footer'; -// Magic Card Component (from main) const MagicCard = ({ children, className = "", @@ -38,6 +37,20 @@ const MagicCard = ({ className={`relative overflow-hidden ${className}`} style={{ position: "relative" }} > + {isHovered && ( +
+ )} {/* Inner glow effect */} {isHovered && ( @@ -57,8 +70,10 @@ const AcademicHub = () => { const router = useRouter(); // eslint-disable-next-line @typescript-eslint/no-unused-vars const [isLoading, setIsLoading] = useState(false); + const [searchQuery, setSearchQuery] = useState(""); - const featuredProjects = [ + // Core projects without duplicates + const coreProjects = [ { id: 1, title: "Assignment-Med", @@ -71,6 +86,7 @@ const AcademicHub = () => { originalPrice: 200, tag: "Best Seller", tagColor: "bg-amber-500", + tags: ["handwritten", "plagiarism-free", "on-time", "assignments"], }, { id: 2, @@ -84,6 +100,7 @@ const AcademicHub = () => { originalPrice: 400, tag: "New", tagColor: "bg-emerald-500", + tags: ["expert-guidance", "plagiarism-free", "termwork"], }, { id: 3, @@ -97,6 +114,7 @@ const AcademicHub = () => { originalPrice: 100, tag: "Popular", tagColor: "bg-blue-500", + tags: ["professional", "custom-design", "presentations", "ppt"], }, { id: 4, @@ -110,9 +128,43 @@ const AcademicHub = () => { originalPrice: 0, tag: "Free", tagColor: "bg-green-500", + tags: ["ai", "generator", "free", "instant"], }, ]; + // Combine with mock projects (starting from id 5 to avoid duplicates) + const allProjects = [ + ...coreProjects, + ...MOCK_PROJECTS.map((project, index) => ({ + id: index + 5, + title: project.title, + category: project.category, + level: project.level, + rating: project.rating, + reviews: project.reviews, + duration: project.deliveryTime, + price: project.price, + originalPrice: project.price * 2, + tag: project.badge || "Available", + tagColor: + project.badge === "Best Seller" ? "bg-amber-500" : + project.badge === "New" ? "bg-emerald-500" : + project.badge === "Popular" ? "bg-blue-500" : "bg-gray-500", + tags: project.tags, + })) + ]; + + const filteredProjects = allProjects.filter((project) => { + if (!searchQuery.trim()) return true; + const query = searchQuery.toLowerCase(); + return ( + project.title.toLowerCase().includes(query) || + project.category.toLowerCase().includes(query) || + project.level.toLowerCase().includes(query) || + project.tags.some((tag) => tag.toLowerCase().includes(query)) + ); + }); + const stats = [ { number: "0%", label: "Plagiarism" }, { number: "5K+", label: "Projects Delivered" }, @@ -125,20 +177,16 @@ const AcademicHub = () => { return (- Get high-quality assignments, projects, and research papers - crafted by experts. Boost your academic performance with our - premium collection. + Get high-quality assignments, projects, and research papers crafted by experts. Boost your academic performance with our premium collection.
+ Showing {filteredProjects.length} results for{" "} + "{searchQuery}" +
+Try different keywords or browse all projects
+ +