|
| 1 | +"use client"; |
| 2 | + |
| 3 | +import { useState, useMemo } from "react"; |
| 4 | +import { motion } from "framer-motion"; |
| 5 | +import { ListTodo, Timer, CheckCircle2, Search } from "lucide-react"; |
| 6 | +import { Priority, RoadmapItemsList, RoadmapItemType } from "@/src/lib/lists"; |
| 7 | +import { Input } from "@/src/components/ui/input"; |
| 8 | +import { Button } from "@/src/components/ui/button"; |
| 9 | +import { RoadmapColumn } from "@/src/components/roadmap/roadmapColumn"; |
| 10 | +import { Header } from "@/src/components/header"; |
| 11 | +import Footer from "@/src/components/footer"; |
| 12 | + |
| 13 | +export default function RoadmapPage() { |
| 14 | + const [searchQuery, setSearchQuery] = useState(""); |
| 15 | + const [priorityFilter, setPriorityFilter] = useState<Priority>("all"); |
| 16 | + |
| 17 | + const filteredItems = useMemo(() => { |
| 18 | + return RoadmapItemsList.filter((item) => { |
| 19 | + const matchesSearch = |
| 20 | + item.title.toLowerCase().includes(searchQuery.toLowerCase()) || |
| 21 | + item.description.toLowerCase().includes(searchQuery.toLowerCase()); |
| 22 | + const matchesPriority = |
| 23 | + priorityFilter === "all" || item.priority === priorityFilter; |
| 24 | + return matchesSearch && matchesPriority; |
| 25 | + }); |
| 26 | + }, [searchQuery, priorityFilter]); |
| 27 | + |
| 28 | + const groupedItems = useMemo(() => { |
| 29 | + return { |
| 30 | + planned: filteredItems.filter((item) => item.status === "planned"), |
| 31 | + "in-progress": filteredItems.filter( |
| 32 | + (item) => item.status === "in-progress", |
| 33 | + ), |
| 34 | + complete: filteredItems.filter((item) => item.status === "complete"), |
| 35 | + }; |
| 36 | + }, [filteredItems]); |
| 37 | + |
| 38 | + return ( |
| 39 | + <div className="min-h-screen bg-background font-sans"> |
| 40 | + <Header /> |
| 41 | + <hr className="m-0 h-px w-full border-none bg-gradient-to-r from-neutral-200/0 via-foreground/20 to-neutral-200/0" /> |
| 42 | + |
| 43 | + <main className="relative"> |
| 44 | + {/* Background Elements */} |
| 45 | + <div className="absolute inset-0 bg-grid-white/[0.02] bg-grid-primary/[0.02]" /> |
| 46 | + <div className="absolute inset-0 flex items-center justify-center"> |
| 47 | + <div className="h-[40rem] w-[40rem] rounded-full bg-primary/5 blur-3xl" /> |
| 48 | + </div> |
| 49 | + <div className="absolute inset-0 bg-background/80 backdrop-blur-sm" /> |
| 50 | + |
| 51 | + {/* Content */} |
| 52 | + <div className="relative container mx-auto px-4 py-16 md:py-24"> |
| 53 | + <motion.div |
| 54 | + initial={{ opacity: 0, y: 20 }} |
| 55 | + animate={{ opacity: 1, y: 0 }} |
| 56 | + transition={{ duration: 0.5 }} |
| 57 | + className="space-y-4 text-center mb-12" |
| 58 | + > |
| 59 | + <div className="inline-flex items-center rounded-full border px-3 py-1 text-sm"> |
| 60 | + <Timer className="mr-2 h-3.5 w-3.5 text-primary" /> |
| 61 | + <span className="text-primary">Development Roadmap</span> |
| 62 | + </div> |
| 63 | + <h1 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold tracking-tighter bg-clip-text text-transparent bg-gradient-to-r from-primary via-primary/70 to-secondary-foreground"> |
| 64 | + Building the Future |
| 65 | + </h1> |
| 66 | + <p className="mx-auto max-w-[700px] text-muted-foreground text-sm sm:text-base md:text-lg lg:text-xl"> |
| 67 | + Track our progress as we build the next generation of web |
| 68 | + development tools. |
| 69 | + </p> |
| 70 | + </motion.div> |
| 71 | + |
| 72 | + <motion.div |
| 73 | + initial={{ opacity: 0, y: 20 }} |
| 74 | + animate={{ opacity: 1, y: 0 }} |
| 75 | + transition={{ duration: 0.5, delay: 0.2 }} |
| 76 | + className="flex flex-col gap-4 items-center justify-center mb-12" |
| 77 | + > |
| 78 | + <div className="relative w-full max-w-sm"> |
| 79 | + <Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" /> |
| 80 | + <Input |
| 81 | + placeholder="Search updates..." |
| 82 | + value={searchQuery} |
| 83 | + onChange={(e) => setSearchQuery(e.target.value)} |
| 84 | + className="pl-9 w-full" |
| 85 | + /> |
| 86 | + </div> |
| 87 | + <div className="flex flex-wrap justify-center gap-2"> |
| 88 | + <Button |
| 89 | + variant={priorityFilter === "all" ? "default" : "outline"} |
| 90 | + size="sm" |
| 91 | + onClick={() => setPriorityFilter("all")} |
| 92 | + className="font-mono" |
| 93 | + > |
| 94 | + All |
| 95 | + </Button> |
| 96 | + <Button |
| 97 | + variant={priorityFilter === "high" ? "default" : "outline"} |
| 98 | + size="sm" |
| 99 | + onClick={() => setPriorityFilter("high")} |
| 100 | + className="font-mono" |
| 101 | + > |
| 102 | + High Priority |
| 103 | + </Button> |
| 104 | + <Button |
| 105 | + variant={priorityFilter === "medium" ? "default" : "outline"} |
| 106 | + size="sm" |
| 107 | + onClick={() => setPriorityFilter("medium")} |
| 108 | + className="font-mono" |
| 109 | + > |
| 110 | + Medium Priority |
| 111 | + </Button> |
| 112 | + </div> |
| 113 | + </motion.div> |
| 114 | + |
| 115 | + <div className="grid gap-8 md:grid-cols-2 lg:grid-cols-3"> |
| 116 | + <RoadmapColumn |
| 117 | + title="Planned" |
| 118 | + icon={ListTodo} |
| 119 | + iconColor="text-blue-500" |
| 120 | + items={groupedItems.planned} |
| 121 | + /> |
| 122 | + <RoadmapColumn |
| 123 | + title="In Progress" |
| 124 | + icon={Timer} |
| 125 | + iconColor="text-purple-500" |
| 126 | + items={groupedItems["in-progress"]} |
| 127 | + /> |
| 128 | + <RoadmapColumn |
| 129 | + title="Complete" |
| 130 | + icon={CheckCircle2} |
| 131 | + iconColor="text-green-500" |
| 132 | + items={groupedItems.complete} |
| 133 | + /> |
| 134 | + </div> |
| 135 | + </div> |
| 136 | + </main> |
| 137 | + <hr className="m-0 h-px w-full border-none bg-gradient-to-r from-neutral-200/0 via-foreground/20 to-neutral-200/0 my-10" /> |
| 138 | + <Footer /> |
| 139 | + </div> |
| 140 | + ); |
| 141 | +} |
0 commit comments