Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import type { NextConfig } from "next";
import bundleAnalyzer from "@next/bundle-analyzer";

const withBundleAnalyzer = bundleAnalyzer({ enabled: process.env.ANALYZE === "true" });

const nextConfig: NextConfig = {
/* config options here */
reactStrictMode: true,
swcMinify: true,
experimental: {
optimizePackageImports: ["lucide-react", "@lottiefiles/dotlottie-react"],
},
images: {
formats: ["image/avif", "image/webp"],
},
};

export default nextConfig;
export default withBundleAnalyzer(nextConfig);
193 changes: 193 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@next/bundle-analyzer": "^15.5.4",
"@tailwindcss/postcss": "^4.1.10",
"@types/node": "^20",
"@types/react": "^19",
Expand Down
33 changes: 4 additions & 29 deletions src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,10 @@ import { DotLottieReact } from '@lottiefiles/dotlottie-react';

const AcademicHub = () => {
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [mounted, setMounted] = useState(false);
// const [isLoading, setIsLoading] = useState(true);
// const [mounted, setMounted] = useState(false);
const router = useRouter();

useEffect(() => {
setMounted(true);
}, []);

useEffect(() => {
if (!mounted) return;
const timer = setTimeout(() => {
setIsLoading(false);
}, 4000);
return () => clearTimeout(timer);
}, [mounted]);

if (!mounted) return null;


const featuredProjects = [
{
Expand Down Expand Up @@ -86,19 +73,7 @@ const AcademicHub = () => {
return (
<div className="min-h-screen bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 text-white overflow-y-auto">
{/* Loading Screen */}
{isLoading && (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-slate-900">
<div className="flex flex-col items-center gap-4">
<DotLottieReact
src="https://lottie.host/184e3f2e-31ad-4bfd-9ea2-5bc8650cf1c9/dBlK14bVkG.lottie"
loop
autoplay
/>
<p className="text-white text-lg font-medium">Loading...</p>
</div>
</div>
)}
<div className={isLoading ? 'opacity-0' : 'opacity-100 transition-opacity duration-500'}>
<div>
<NavbarDemo />

{/* Hero Section */}
Expand Down
Loading