From 6d770a331fa3d1be12b533879a9a66ccbe874466 Mon Sep 17 00:00:00 2001 From: Victor Peter Date: Sun, 26 Apr 2026 15:35:36 +0100 Subject: [PATCH] Revert "fix/lint/build failure" --- dongle/app/discover/page.tsx | 72 +- dongle/app/layout.tsx | 8 +- dongle/app/projects/new/page.tsx | 96 +- dongle/app/verify/page.tsx | 2 +- .../components/landing/FeaturedProjects.tsx | 57 +- dongle/components/layout/Footer.tsx | 76 +- dongle/components/layout/LayoutWrapper.tsx | 2 +- dongle/components/layout/Navbar.tsx | 34 +- dongle/components/projects/ProjectCard.tsx | 2 +- dongle/components/projects/ProjectForm.tsx | 34 +- dongle/components/verify/VerificationForm.tsx | 24 +- dongle/data/mockProjects.ts | 58 +- dongle/package-lock.json | 2471 ++++++----------- dongle/services/stellar/soroban.service.ts | 98 +- 14 files changed, 1069 insertions(+), 1965 deletions(-) diff --git a/dongle/app/discover/page.tsx b/dongle/app/discover/page.tsx index 4b63062..04564a9 100644 --- a/dongle/app/discover/page.tsx +++ b/dongle/app/discover/page.tsx @@ -2,26 +2,22 @@ import React, { useState, useMemo } from "react"; import LayoutWrapper from "@/components/layout/LayoutWrapper"; -import { mockProjects } from "@/data/mockProjects"; +import { mockProjects, Project } from "@/data/mockProjects"; import { ProjectCard } from "@/components/projects/ProjectCard"; import { Button } from "@/components/ui/Button"; -import { Search, Filter } from "lucide-react"; +import { Search, Loader2, Filter } from "lucide-react"; +import { FormField } from "@/components/ui/FormField"; const ITEMS_PER_PAGE = 9; export default function DiscoverPage() { const [searchQuery, setSearchQuery] = useState(""); const [selectedCategory, setSelectedCategory] = useState("All"); - const [sortBy, setSortBy] = useState<"rating" | "newest" | "popular">( - "rating", - ); + const [sortBy, setSortBy] = useState<"rating" | "newest" | "popular">("rating"); const [visibleCount, setVisibleCount] = useState(ITEMS_PER_PAGE); const [isLoadingMore, setIsLoadingMore] = useState(false); - const categories = [ - "All", - ...Array.from(new Set(mockProjects.map((p) => p.category))), - ]; + const categories = ["All", ...Array.from(new Set(mockProjects.map(p => p.category)))]; // Apply filters and sorting const filteredAndSortedProjects = useMemo(() => { @@ -30,26 +26,22 @@ export default function DiscoverPage() { // Apply Search if (searchQuery) { const q = searchQuery.toLowerCase(); - result = result.filter( - (p) => - p.name.toLowerCase().includes(q) || - p.description.toLowerCase().includes(q), + result = result.filter(p => + p.name.toLowerCase().includes(q) || + p.description.toLowerCase().includes(q) ); } // Apply Category Filter if (selectedCategory !== "All") { - result = result.filter((p) => p.category === selectedCategory); + result = result.filter(p => p.category === selectedCategory); } // Apply Sorting result = [...result].sort((a, b) => { if (sortBy === "rating") return b.rating - a.rating; if (sortBy === "popular") return b.reviews - a.reviews; - if (sortBy === "newest") - return ( - new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime() - ); + if (sortBy === "newest") return new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(); return 0; }); @@ -63,7 +55,7 @@ export default function DiscoverPage() { setIsLoadingMore(true); // Simulate network delay for loading chunks setTimeout(() => { - setVisibleCount((prev) => prev + ITEMS_PER_PAGE); + setVisibleCount(prev => prev + ITEMS_PER_PAGE); setIsLoadingMore(false); }, 600); }; @@ -77,20 +69,18 @@ export default function DiscoverPage() {
+ {/* Header & Controls */}
-

- Discover Projects -

+

Discover Projects

- Explore the ecosystem of decentralized applications, - infrastructure, and tools built on Stellar and Soroban. + Explore the ecosystem of decentralized applications, infrastructure, and tools built on Stellar and Soroban.

-
- {categories.map((cat) => ( + {categories.map(cat => (