Skip to content
Merged
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
2 changes: 1 addition & 1 deletion frontend/src/mocks/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface Project {
stars: number;
forks: number;
progress: number;
status: "active" | "planning" | "shipped";
status: "recruiting" | "in-progress" | "completed" | "archived";
icon: string;
language?: string;
difficulty?: "beginner" | "intermediate" | "advanced";
Expand Down
24 changes: 17 additions & 7 deletions frontend/src/routes/_app.projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function toggle<T>(set: T[], val: T): T[] {

function ProjectsPage() {
const [q, setQ] = useState("");
const [statusFilter, setStatusFilter] = useState<"all" | "active" | "planning" | "shipped">("all");
const [statusFilter, setStatusFilter] = useState<"all" | "recruiting" | "in-progress" | "completed" | "archived">("all");
const [showFilters, setShowFilters] = useState(false);
const [langs, setLangs] = useState<string[]>([]);
const [difficulties, setDifficulties] = useState<string[]>([]);
Expand Down Expand Up @@ -113,9 +113,12 @@ function ProjectsPage() {
/>
</div>
<div className="flex items-center gap-1 rounded-md border border-border bg-surface p-0.5">
{(["all", "active", "planning", "shipped"] as const).map((f) => (
{(["all", "recruiting", "in-progress", "completed", "archived"] as const).map((f) => (
<button
key={f}
key={f
.split("-")
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
.join(" ")}
onClick={() => setStatusFilter(f)}
className={`rounded px-2.5 py-1 text-[12px] font-medium capitalize transition-colors ${
statusFilter === f ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground"
Expand Down Expand Up @@ -257,10 +260,17 @@ function ProjectsPage() {
<GitFork size={12} /> {p.forks}
</span>
<span className={`rounded-md px-1.5 py-0.5 text-[10px] font-semibold uppercase ${
p.status === "active" ? "bg-success/10 text-success" :
p.status === "planning" ? "bg-warning/10 text-warning" :
"bg-muted text-muted-foreground"
}`}>{p.status}</span>
p.status === "recruiting"
? "bg-primary/10 text-primary"
: p.status === "in-progress"
? "bg-warning/10 text-warning"
: p.status === "completed"
? "bg-success/10 text-success"
: "bg-muted text-muted-foreground"
}`}>{p.status
.split("-")
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
.join(" ")}</span>
</div>
</Card>
</Link>
Expand Down
Loading