Skip to content

Commit

Permalink
fix: hydration issue with nested buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Sep 1, 2024
1 parent 2415ecd commit 5e79bd4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import {
export function Tooltip({
children,
text,
}: React.PropsWithChildren<{ text: string }>) {
asChild = true,
}: React.PropsWithChildren<{ text: string; asChild?: boolean }>) {
return (
<TooltipProvider>
<_Tooltip delayDuration={0}>
<TooltipTrigger>{children}</TooltipTrigger>
<TooltipTrigger asChild={asChild}>{children}</TooltipTrigger>
<TooltipContent>
<p>{text}</p>
</TooltipContent>
Expand Down

0 comments on commit 5e79bd4

Please sign in to comment.