diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index cbe0dd1..8660b82 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -1,77 +1,29 @@ "use client"; - -import React, { useState, useEffect, useRef } from "react"; +import React, { useState, useEffect } 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"; +import Image from "next/image"; +import styles from "./uiverseButton.module.css"; // Updated for CSS-module integration -// 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); - - const handleMouseMove = (e: React.MouseEvent) => { - if (!cardRef.current) return; - const rect = cardRef.current.getBoundingClientRect(); - setMousePosition({ - x: e.clientX - rect.left, - y: e.clientY - rect.top, - }); - }; - - return ( -
setIsHovered(true)} - onMouseLeave={() => setIsHovered(false)} - className={`relative overflow-hidden ${className}`} - style={{ position: "relative" }} - > - {/* Border highlight effect */} - {isHovered && ( -
- )} - {/* Inner glow effect */} - {isHovered && ( -
- )} - {children} -
- ); -}; const AcademicHub = () => { const router = useRouter(); - const [isLoading, setIsLoading] = useState(false); + const [isLoading, setIsLoading] = React.useState(true); + const [mounted, setMounted] = useState(false); + useEffect(() => { + setMounted(true); + }, []); + + useEffect(() => { + if (!mounted) return; + const timer = setTimeout(() => setIsLoading(false), 4000); + return () => clearTimeout(timer); + }, [mounted]); + + if (!mounted) return null; const featuredProjects = [ { @@ -133,13 +85,13 @@ const AcademicHub = () => { { 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"]; return (
- {/* Loading Screen (from your branch) */} {isLoading && }
{ isLoading ? "opacity-0" : "opacity-100 transition-opacity duration-500" } > - {/* Navbar */} - {/* Hero Section (single) */} -
-
-
-

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

-

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

-
- - -
-
-
- - {/* Featured Projects (MagicCard + your Shop Now button) */} + {/* Featured Projects */}
-
-

Featured Projects

+
+

+ Featured Projects +

- - ))} -
-
-
- - {/* Stats Section */} -
-
-
- {stats.map((stat, index) => ( -
-
- {stat.number} -
-
{stat.label}
))}
- - {/* Footer */} -
); }; export default AcademicHub; + diff --git a/src/app/dashboard/uiverseButton.module.css b/src/app/dashboard/uiverseButton.module.css new file mode 100644 index 0000000..a12dd73 --- /dev/null +++ b/src/app/dashboard/uiverseButton.module.css @@ -0,0 +1,60 @@ +/* Button.module.css - Converted for Next.js CSS Modules integration */ + +/* Base CTA button */ +.cta { + border: none; + background: none; + cursor: pointer; + display: inline-flex; + align-items: center; + color: white; +} + +/* Text styling inside span */ +.cta span { + padding-bottom: 7px; + letter-spacing: 4px; + font-size: 14px; + padding-right: 15px; + text-transform: uppercase; +} + +/* SVG animation */ +.cta svg { + transform: translateX(-8px); + transition: all 0.3s ease; + fill: white; +} + +.cta:hover svg { + transform: translateX(0); +} + +.cta:active svg { + transform: scale(0.9); +} + +/* Underline animation on hover */ +.hoverUnderlineAnimation { + position: relative; + color: white; + padding-bottom: 20px; +} + +.hoverUnderlineAnimation::after { + content: ""; + position: absolute; + width: 100%; + transform: scaleX(0); + height: 2px; + bottom: 0; + left: 0; + background-color: white; + transform-origin: bottom right; + transition: transform 0.25s ease-out; +} + +.cta:hover .hoverUnderlineAnimation::after { + transform: scaleX(1); + transform-origin: bottom left; +}