diff --git a/frontend/src/pages/GraphVisualizer.jsx b/frontend/src/pages/GraphVisualizer.jsx
index c97ed98..3718e0d 100644
--- a/frontend/src/pages/GraphVisualizer.jsx
+++ b/frontend/src/pages/GraphVisualizer.jsx
@@ -2,6 +2,7 @@ import React, { useState, useEffect, useCallback, useRef } from 'react';
import { Play, Pause, RotateCcw, Zap, Settings, ChevronDown, ChevronUp, BookOpen, Network, Download, Search, Moon, Sun, User, Palette } from 'lucide-react';
import toast from 'react-hot-toast';
import { useTheme } from '../contexts/ThemeContext';
+import { AlgorithmSettingsProvider } from '../contexts/AlgorithmSettingsContext';
import GraphCanvas from '../components/Graph/GraphCanvas';
import GraphInput from '../components/Graph/GraphInput';
import ControlPanel from '../components/Sorting/ControlPanel';
@@ -525,9 +526,10 @@ const GraphVisualizer = () => {
const [darkMode,setDarkMode]=useState(false);
return (
-
- {/* Conditional Particle Background */}
- {showParticles && !timeoutDetected && (
+
+
+ {/* Conditional Particle Background */}
+ {showParticles && !timeoutDetected && (
{
to { opacity: 1; transform: translateY(0); }
}
`}} />
-
+
+
);
};
diff --git a/frontend/src/pages/NotFoundPage.jsx b/frontend/src/pages/NotFoundPage.jsx
index b36349d..6bfbcdd 100644
--- a/frontend/src/pages/NotFoundPage.jsx
+++ b/frontend/src/pages/NotFoundPage.jsx
@@ -1,49 +1,144 @@
import { Link } from "react-router-dom";
-import { AlertCircle, Cpu, ArrowLeft } from "lucide-react";
+import { ArrowLeft, Home, BookOpen, GitBranch, Activity } from "lucide-react";
import { useTheme } from "../contexts/ThemeContext";
+import { motion } from "framer-motion";
+import { useState, useEffect } from "react";
const NotFoundPage = () => {
- const { isDark, classes, getThemedGradient } = useTheme();
+ const { isDark, classes } = useTheme();
+ const [pathSearching, setPathSearching] = useState(true);
+
+ useEffect(() => {
+ const timer = setTimeout(() => setPathSearching(false), 3000);
+ return () => clearTimeout(timer);
+ }, []);
+
+ // Quick links for algorithm visualizer platform
+ const quickLinks = [
+ { to: "/", icon: Home, label: "Home", color: "blue" },
+ { to: "/sorting", icon: Activity, label: "Sorting Visualizer", color: "purple" },
+ { to: "/graph", icon: GitBranch, label: "Graph Algorithms", color: "teal" },
+ { to: "/tutorials", icon: BookOpen, label: "Tutorials", color: "green" },
+ ];
return (
-
- {/* Floating icons for tech vibe */}
-
-
-
-
+
+
+
+ {/* 404 Title Section */}
+
+
+ 404
+
+
+
+
+ {/* Error Message Section */}
+
+
+ Path Not Found
+
+
+ {pathSearching
+ ? "Searching through the algorithm tree..."
+ : "No valid path exists to this route. The algorithm couldn't find a solution here."}
+
+
+ Error Code: ROUTE_NOT_FOUND | Stack Trace: /404
+
+
+
+ {/* Primary CTA Buttons */}
+
+
+
+ Back to Home
+
+
+
+ View Docs
+
+
+
+ {/* Quick Navigation Section */}
+
+
+
+ Explore Our Visualizers
+
+
+ {quickLinks.map((link) => (
+
+
+
+
+
+ {link.label}
+
+
+ ))}
+
+
- {/* Main content */}
-
-
404
-
- Uh-oh! This algorithm didn't find a solution here.
-
-
- Looks like this page isn't in the visualization. Try going back and
- exploring!
-
-
-
- Go Back to Visualizer
-
+ {/* Bottom Hint */}
+
+
+ 💡 Tip: Use breadth-first search to navigate back to familiar routes
+
+
+
+
-
+
);
};