Skip to content

Commit

Permalink
feat(events): adds and adjust events
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa-thayto committed Jan 30, 2024
1 parent e9a417e commit d115e41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/components/BlogCard/BlogCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ export const BlogCard = ({

return (
<div className="rounded-lg overflow-hidden shadow-lg transition border-gray-400 dark:border-black hover:border-indigo-300 hover:border border bg-slate-50 dark:bg-gray-800">
<Link href={href}>
<Link
href={href}
onClick={() => {
window.simplytics.track('blog-card-clicked', { href, title })
}}
>
{image && (
<>
<div
Expand Down
4 changes: 2 additions & 2 deletions src/pages/blog/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const PostPage = ({
className="py-8 px-10 text-center md:text-right first:rounded-t-lg md:first:rounded-tr-none md:first:rounded-l-lg last:rounded-r-lg first last:rounded-b-lg backdrop-blur-lg bg-slate-50 bg-opacity-100 dark:bg-opacity-10 hover:bg-opacity-30 dark:hover:bg-opacity-20 transition border border-gray-800 border-opacity-10 last:border-t md:border-r-0 md:last:border-r md:last:rounded-r-none flex flex-col"
onClick={() => {
window.simplytics.track('change-post-btn', {
post: `/blog/${prevPost.slug}`,
href: `/blog/${prevPost.slug}`,
title: prevPost.title,
})
}}
Expand All @@ -145,7 +145,7 @@ const PostPage = ({
className="py-8 px-10 text-center md:text-left md:first:rounded-t-lg last:rounded-b-lg first:rounded-l-lg md:last:rounded-bl-none md:last:rounded-r-lg backdrop-blur-lg bg-slate-50 bg-opacity-100 dark:bg-opacity-10 hover:bg-opacity-30 dark:hover:bg-opacity-20 transition border border-gray-800 border-opacity-10 border-t-0 first:border-t first:rounded-t-lg md:border-t border-b-0 last:border-b flex flex-col"
onClick={() => {
window.simplytics.track('change-post-btn', {
post: `/blog/${nextPost.slug}`,
href: `/blog/${nextPost.slug}`,
title: nextPost.title,
})
}}
Expand Down

0 comments on commit d115e41

Please sign in to comment.