diff --git a/package-lock.json b/package-lock.json index f5a401b..16920f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3070,7 +3070,6 @@ "integrity": "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.0.2" } @@ -3081,7 +3080,6 @@ "integrity": "sha512-4hOiT/dwO8Ko0gV1m/TJZYk3y0KBnY9vzDh7W+DH17b2HFSOGgdj33dhihPeuy3l0q23+4e+hoXHV6hCC4dCXw==", "devOptional": true, "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.0.0" } @@ -3148,7 +3146,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", @@ -3665,7 +3662,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4085,7 +4081,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001718", "electron-to-chromium": "^1.5.160", @@ -4763,7 +4758,6 @@ "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -4937,7 +4931,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", @@ -7493,7 +7486,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -7686,7 +7678,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" } @@ -7696,7 +7687,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" }, @@ -8534,7 +8524,6 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -8700,7 +8689,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 7227965..cbe0dd1 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -1,11 +1,21 @@ "use client"; -import React, { useState, useEffect, useRef } from 'react'; -import { Star, Clock, Filter } from 'lucide-react'; -import Image from 'next/image'; -import { NavbarDemo } from '@/components/nav'; -// Magic Card Component -const MagicCard = ({ children, className = "" }: { children: React.ReactNode; className?: string }) => { +import React, { useState, useEffect, useRef } from "react"; +import { Star, Clock, Filter } from "lucide-react"; +import Image from "next/image"; +import { useRouter } from "next/navigation"; +import { NavbarDemo } from "@/components/nav"; +import { AnimatePresence } from "framer-motion"; +import AcademicHubSkeleton from "@/components/skeletons/dashboardPageSkeleton"; + +// Magic Card Component (from main) +const MagicCard = ({ + children, + className = "", +}: { + children: React.ReactNode; + className?: string; +}) => { const cardRef = useRef(null); const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 }); const [isHovered, setIsHovered] = useState(false); @@ -26,7 +36,7 @@ const MagicCard = ({ children, className = "" }: { children: React.ReactNode; cl onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} className={`relative overflow-hidden ${className}`} - style={{ position: 'relative' }} + style={{ position: "relative" }} > {/* Border highlight effect */} {isHovered && ( @@ -34,12 +44,14 @@ const MagicCard = ({ children, className = "" }: { children: React.ReactNode; cl className="pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100" style={{ background: `radial-gradient(400px circle at ${mousePosition.x}px ${mousePosition.y}px, rgba(139, 92, 246, 0.4), transparent 40%)`, - maskImage: 'linear-gradient(black, black) content-box, linear-gradient(black, black)', - maskComposite: 'exclude', - WebkitMaskImage: 'linear-gradient(black, black) content-box, linear-gradient(black, black)', - WebkitMaskComposite: 'xor', - padding: '1px', - borderRadius: 'inherit', + maskImage: + "linear-gradient(black, black) content-box, linear-gradient(black, black)", + maskComposite: "exclude", + WebkitMaskImage: + "linear-gradient(black, black) content-box, linear-gradient(black, black)", + WebkitMaskComposite: "xor", + padding: "1px", + borderRadius: "inherit", }} /> )} @@ -58,6 +70,7 @@ const MagicCard = ({ children, className = "" }: { children: React.ReactNode; cl }; const AcademicHub = () => { + const router = useRouter(); const [isLoading, setIsLoading] = useState(false); const featuredProjects = [ @@ -72,7 +85,7 @@ const AcademicHub = () => { price: 100, originalPrice: 200, tag: "Best Seller", - tagColor: "bg-amber-500" + tagColor: "bg-amber-500", }, { id: 2, @@ -85,7 +98,7 @@ const AcademicHub = () => { price: 250, originalPrice: 400, tag: "New", - tagColor: "bg-emerald-500" + tagColor: "bg-emerald-500", }, { id: 3, @@ -98,7 +111,7 @@ const AcademicHub = () => { price: 50, originalPrice: 100, tag: "Popular", - tagColor: "bg-blue-500" + tagColor: "bg-blue-500", }, { id: 4, @@ -111,229 +124,299 @@ const AcademicHub = () => { price: 0, originalPrice: 0, tag: "Free", - tagColor: "bg-green-500" - } + tagColor: "bg-green-500", + }, ]; const stats = [ { number: "0%", label: "Plagiarism" }, { number: "5K+", label: "Projects Delivered" }, { number: "98%", label: "Success Rate" }, - { number: "24/7", label: "Support" } + { number: "24/7", label: "Support" }, ]; - const categories = [ - "Assignments", - "Projects", - "Presentations", - "Termwork" - ]; + const categories = ["Assignments", "Projects", "Presentations", "Termwork"]; return (
- {/* Navbar */} - - - {/* Hero Section */} -
-
-
-

- Premium Academic{" "} - - Solutions - -

-

- Get high-quality assignments, projects, and research papers crafted by experts. - Boost your academic performance with our premium collection. -

-
- - -
-
-
+ {/* Loading Screen (from your branch) */} + {isLoading && } + +
+ {/* Navbar */} + - {/* Featured Projects */} -
-
-
-

Featured Projects

-
- -
+
-
- {featuredProjects.map((project) => ( - -
- - {project.tag} - -
+ {/* Featured Projects (MagicCard + your Shop Now button) */} +
+
+
+

Featured Projects

+
+ + +
+
-
- {project.id === 1 && ( - Assignment - )} - {project.id === 2 && ( - Termwork - )} - {project.id === 3 && ( -
-
📊
-
- )} - {project.id === 4 && ( -
-
🤖
+
+ {featuredProjects.map((project) => ( + +
+ + {project.tag} + +
+ +
+ {project.id === 1 && ( + Assignment + )} + {project.id === 2 && ( + Termwork + )} + {project.id === 3 && ( +
+
📊
+
+ )} + {project.id === 4 && ( +
+
🤖
+
+ )} +
+ +
+
+ + {project.category} + + + {project.level} +
- )} -
+

+ {project.title} +

+
-
-
- {project.category} - {project.level} +
+
+ + {project.rating} + ({project.reviews} reviews) +
-

- {project.title} -

-
-
-
- - {project.rating} - ({project.reviews} reviews) +
+ + {project.duration}
-
-
- - {project.duration} -
+
+
+ {project.id === 4 ? ( + + FREE + + ) : ( + <> + + ₹{project.price} + + + ₹{project.originalPrice} + + + )} +
-
-
- {project.id === 4 ? ( - FREE - ) : ( - <> - ₹{project.price} - ₹{project.originalPrice} - - )} + {/* Your new minimal button */} +
- + + ))} +
+
+
+ + {/* Stats Section */} +
+
+
+ {stats.map((stat, index) => ( +
+
+ {stat.number} +
+
{stat.label}
- - ))} + ))} +
-
- + - {/* Stats Section */} -
-
-
- {stats.map((stat, index) => ( -
-
- {stat.number} + {/* Footer */} +
+
+
+ {/* Company Info */} +
+
+
+ A +
+ + Asshelp +
-
{stat.label}
+

+ Your trusted partner for academic excellence. Get premium + assignments and projects delivered on time. +

- ))} -
-
-
- {/* Footer */} - + +
); }; -export default AcademicHub; \ No newline at end of file +export default AcademicHub;