3 Commits

Author SHA1 Message Date
sanjidarimi aa7ee3f19e fixed 2026-06-17 20:33:30 +06:00
sanjidarimi e1ed111c55 fix(not-found):remove unused useEffect that polutted client logs 2026-06-17 20:31:27 +06:00
sanjidarimi 24544eb680 fix:remove unnecessary console and clean up code 2026-06-17 20:22:36 +06:00
3 changed files with 11 additions and 22 deletions
@@ -13,7 +13,7 @@ export default function ManageProject() {
const { data: projectsData, isLoading } = useProjects();
const updateMutation = useUpdateProject();
const deleteMutation = useDeleteProject();
console.log("project data", projectsData?.data.data.result)
const [selectedProject, setSelectedProject] = useState<T_projects | null>(
null,
);
+6 -12
View File
@@ -7,21 +7,15 @@ import { Link } from "react-router-dom";
import PremiumBadge from "../shared/PremiumBadge";
import { ProjectCard } from "./ProjectCard";
const gradientColors = [
"from-neon-blue/90",
"from-neon-purple/90",
"from-neon-green/90",
"from-neon-pink/90",
];
export default function ProjectsSection() {
const { data: projectsData } = useProjects({
fields: "category, title, image, liveUrl",
limit: 6,
});
console.log(projectsData?.data.data);
const projects = projectsData?.data.data || [];
console.log("project from homepage", projects);
const ref = useRef<HTMLElement>(null);
const isInView = useInView(ref, { once: true, margin: "-100px" });
@@ -31,7 +25,7 @@ export default function ProjectsSection() {
ref={ref}
className="py-24 relative overflow-hidden bg-secondary/30"
>
{/* Background Pattern */}
<div className="absolute inset-0 opacity-5">
<div
className="absolute inset-0"
@@ -43,7 +37,7 @@ export default function ProjectsSection() {
</div>
<div className="container mx-auto px-4 relative z-10">
{/* Section Header */}
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={isInView ? { opacity: 1, y: 0 } : {}}
@@ -62,7 +56,7 @@ export default function ProjectsSection() {
</p>
</motion.div>
{/* Projects Grid */}
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8 mb-16">
{projects.map((project, index) => {
return (
@@ -76,7 +70,7 @@ export default function ProjectsSection() {
})}
</div>
{/* See All Button */}
<motion.div
initial={{ opacity: 0, y: 30 }}
animate={isInView ? { opacity: 1, y: 0 } : {}}
+4 -9
View File
@@ -1,18 +1,13 @@
import { Link, useLocation } from "react-router-dom";
import { useEffect } from "react";
import { Link } from "react-router-dom";
const NotFound = () => {
const location = useLocation();
useEffect(() => {
console.error("404 Error: User attempted to access non-existent route:", location.pathname);
}, [location.pathname]);
return (
<div className="flex min-h-screen items-center justify-center bg-muted">
<div className="text-center">
<h1 className="mb-4 text-4xl font-bold">404</h1>
<p className="mb-4 text-xl text-muted-foreground">Oops! Page not found</p>
<p className="mb-4 text-xl text-muted-foreground">
Oops! Page not found.
</p>
<Link to="/" className="text-primary underline hover:text-primary/90">
Return to Home
</Link>