maybe fix tooltip on mobile?
Some checks failed
Deploy Website / docker (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Lee 2024-10-23 16:22:41 +01:00
parent 55b9f0e4ef
commit 56b2f272b9

View File

@ -3,6 +3,7 @@
import { Tooltip as ShadCnTooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip";
import { useState } from "react";
import { cn } from "@/common/utils";
import { useDebounce } from "@uidotdev/usehooks";
type Props = {
/**
@ -33,9 +34,10 @@ type Props = {
export default function Tooltip({ children, display, asChild = true, side = "top", className }: Props) {
const [open, setOpen] = useState(false);
const openDebounce = useDebounce(open, 100);
return (
<ShadCnTooltip>
<ShadCnTooltip open={openDebounce}>
<TooltipTrigger className={className} asChild={asChild}>
<div
className={cn("cursor-default", className)}