From e4f2ce92210f430fad64d2f06edec2743f6406e8 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Sun, 29 Jun 2025 22:04:35 +0200 Subject: [PATCH] fix: auto-focus on dropdown trigger and hover effect disappearing --- apps/web/src/app/projects/page.tsx | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/apps/web/src/app/projects/page.tsx b/apps/web/src/app/projects/page.tsx index ad1c0c0..82bae5d 100644 --- a/apps/web/src/app/projects/page.tsx +++ b/apps/web/src/app/projects/page.tsx @@ -1,6 +1,7 @@ "use client"; import Link from "next/link"; +import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; import { @@ -127,6 +128,8 @@ export default function ProjectsPage() { } function ProjectCard({ project }: { project: TProject }) { + const [isDropdownOpen, setIsDropdownOpen] = useState(false); + const formatDuration = (seconds: number): string => { const minutes = Math.floor(seconds / 60); const remainingSeconds = Math.floor(seconds % 60); @@ -144,7 +147,11 @@ function ProjectCard({ project }: { project: TProject }) { return ( -
+
{/* Thumbnail preview */}
{project.name} - + - + { + e.preventDefault(); + e.stopPropagation(); + console.log("close"); + }} + > Rename Duplicate