Skip to content

Commit

Permalink
chore: add seline hover events
Browse files Browse the repository at this point in the history
  • Loading branch information
duyet committed Sep 24, 2024
1 parent 3815212 commit 84c7f74
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apps/cv/components/hover-links.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
'use client'

import * as seline from '@seline-analytics/web'
import Link from 'next/link'

import {
Expand All @@ -14,7 +17,13 @@ export function HoverLinks({
links: { text: string; href: string }[]
}) {
return (
<HoverCard openDelay={50} closeDelay={0}>
<HoverCard
openDelay={50}
closeDelay={0}
onOpenChange={(open: boolean) => {
if (open) seline.track('CV: Hover Link', { text })
}}
>
<HoverCardTrigger asChild>
<span className="cursor-context-menu underline decoration-slate-300 decoration-wavy decoration-1 underline-offset-4">
{text}
Expand Down

0 comments on commit 84c7f74

Please sign in to comment.