refactor: simplify DutyTimelineCard component by removing TooltipProvider and Tooltip

- Removed TooltipProvider and Tooltip components from DutyTimelineCard, streamlining the button interaction for displaying contact information.
- Updated the button implementation to directly handle the click event, enhancing code clarity and reducing complexity.
This commit is contained in:
2026-03-03 16:28:07 +03:00
parent 95c9e23c33
commit fd527917e0

View File

@@ -15,12 +15,6 @@ import {
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { ContactLinks } from "@/components/contact/ContactLinks"; import { ContactLinks } from "@/components/contact/ContactLinks";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
TooltipProvider,
} from "@/components/ui/tooltip";
import type { DutyWithUser } from "@/types"; import type { DutyWithUser } from "@/types";
import { Phone, ArrowLeft } from "lucide-react"; import { Phone, ArrowLeft } from "lucide-react";
@@ -120,9 +114,6 @@ export function DutyTimelineCard({ duty, isCurrent }: DutyTimelineCardProps) {
{duty.full_name} {duty.full_name}
</span> </span>
<span className="text-[0.8rem] text-muted row-start-3">{timeStr}</span> <span className="text-[0.8rem] text-muted row-start-3">{timeStr}</span>
<TooltipProvider delayDuration={300}>
<Tooltip>
<TooltipTrigger asChild>
<Button <Button
ref={frontBtnRef} ref={frontBtnRef}
type="button" type="button"
@@ -137,12 +128,6 @@ export function DutyTimelineCard({ duty, isCurrent }: DutyTimelineCardProps) {
> >
<Phone className="size-[18px]" aria-hidden /> <Phone className="size-[18px]" aria-hidden />
</Button> </Button>
</TooltipTrigger>
<TooltipContent side="left" sideOffset={8}>
{t("contact.show")}
</TooltipContent>
</Tooltip>
</TooltipProvider>
</div> </div>
{/* Back */} {/* Back */}
<div <div